PageRenderTime 59ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/SkilfulDocs/html/_control_8cs_source.html

#
HTML | 1960 lines | 1954 code | 2 blank | 4 comment | 0 complexity | ae6b306ca004aa6213d3733d5d450ec6 MD5 | raw file
Possible License(s): GPL-2.0

Large files files are truncated, but you can click here to view the full file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>Skilful: Исходный файл Skilful/ChartV2/Control.cs</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  8. <script type="text/javaScript" src="search/search.js"></script>
  9. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  10. </head>
  11. <body onload='searchBox.OnSelectItem(0);'>
  12. <!-- Создано системой Doxygen 1.7.1 -->
  13. <script type="text/javascript"><!--
  14. var searchBox = new SearchBox("searchBox", "search",false,'Поиск');
  15. --></script>
  16. <div class="navigation" id="top">
  17. <div class="tabs">
  18. <ul class="tablist">
  19. <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
  20. <li><a href="namespaces.html"><span>Пакеты</span></a></li>
  21. <li><a href="annotated.html"><span>Классы</span></a></li>
  22. <li class="current"><a href="files.html"><span>Файлы</span></a></li>
  23. <li><a href="dirs.html"><span>Алфавитный&nbsp;указатель&nbsp;директорий</span></a></li>
  24. <li id="searchli">
  25. <div id="MSearchBox" class="MSearchBoxInactive">
  26. <span class="left">
  27. <img id="MSearchSelect" src="search/mag_sel.png"
  28. onmouseover="return searchBox.OnSearchSelectShow()"
  29. onmouseout="return searchBox.OnSearchSelectHide()"
  30. alt=""/>
  31. <input type="text" id="MSearchField" value="Поиск" accesskey="S"
  32. onfocus="searchBox.OnSearchFieldFocus(true)"
  33. onblur="searchBox.OnSearchFieldFocus(false)"
  34. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  35. </span><span class="right">
  36. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  37. </span>
  38. </div>
  39. </li>
  40. </ul>
  41. </div>
  42. <div class="tabs2">
  43. <ul class="tablist">
  44. <li><a href="files.html"><span>Файлы</span></a></li>
  45. </ul>
  46. </div>
  47. <div class="navpath">
  48. <ul>
  49. <li><a class="el" href="dir_7adcdc1edff7620168fbc20357cad448.html">Skilful</a> </li>
  50. <li><a class="el" href="dir_8daa841e026a5c92daaf3ffe66f86a47.html">ChartV2</a> </li>
  51. </ul>
  52. </div>
  53. </div>
  54. <div class="header">
  55. <div class="headertitle">
  56. <h1>Control.cs</h1> </div>
  57. </div>
  58. <div class="contents">
  59. <a href="_control_8cs.html">См. документацию.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//---------------------------------------------------------------------------------------------------------------</span>
  60. <a name="l00002"></a>00002 <span class="comment">// Skilful. Tactica Adversa graphic and analysis tool.</span>
  61. <a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2010 &quot;...&quot;, Logvinenko Eugeniy (manuka)</span>
  62. <a name="l00004"></a>00004 <span class="comment">//</span>
  63. <a name="l00005"></a>00005 <span class="comment">// This program is free software; you can redistribute it and/or</span>
  64. <a name="l00006"></a>00006 <span class="comment">// modify it under the terms of the GNU General Public License</span>
  65. <a name="l00007"></a>00007 <span class="comment">// as published by the Free Software Foundation; either version 2</span>
  66. <a name="l00008"></a>00008 <span class="comment">// of the License, or (at your option) any later version.</span>
  67. <a name="l00009"></a>00009 <span class="comment">//</span>
  68. <a name="l00010"></a>00010 <span class="comment">// This program is distributed in the hope that it will be useful,</span>
  69. <a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
  70. <a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
  71. <a name="l00013"></a>00013 <span class="comment">// GNU General Public License for more details.</span>
  72. <a name="l00014"></a>00014 <span class="comment">//</span>
  73. <a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU General Public License</span>
  74. <a name="l00016"></a>00016 <span class="comment">// along with this program; if not, write to the Free Software</span>
  75. <a name="l00017"></a>00017 <span class="comment">// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</span>
  76. <a name="l00018"></a>00018 <span class="comment">//</span>
  77. <a name="l00019"></a>00019 <span class="comment">// mail: support@protoforma.com </span>
  78. <a name="l00020"></a>00020 <span class="comment">//---------------------------------------------------------------------------------------------------------------</span>
  79. <a name="l00021"></a>00021
  80. <a name="l00022"></a>00022
  81. <a name="l00023"></a>00023 <span class="keyword">using</span> System;
  82. <a name="l00024"></a>00024 <span class="keyword">using</span> Skilful.QuotesManager;
  83. <a name="l00025"></a>00025 <span class="keyword">using</span> System.Collections.Generic;
  84. <a name="l00026"></a>00026 <span class="keyword">using</span> System.ComponentModel;
  85. <a name="l00027"></a>00027 <span class="keyword">using</span> System.IO;
  86. <a name="l00028"></a>00028 <span class="keyword">using</span> System.Drawing;
  87. <a name="l00029"></a>00029 <span class="keyword">using</span> System.Text;
  88. <a name="l00030"></a>00030 <span class="keyword">using</span> System.Windows.Forms;
  89. <a name="l00031"></a>00031
  90. <a name="l00032"></a>00032
  91. <a name="l00033"></a>00033 <span class="keyword">using</span> System.Runtime.Serialization;
  92. <a name="l00034"></a>00034 <span class="keyword">using</span> System.Runtime.Serialization.Formatters.Binary;
  93. <a name="l00035"></a>00035 <span class="keyword">using</span> System.Reflection;
  94. <a name="l00036"></a>00036 <span class="keyword">using</span> ChartV2.Data;
  95. <a name="l00037"></a>00037 <span class="keyword">using</span> System.Linq;
  96. <a name="l00038"></a>00038
  97. <a name="l00039"></a>00039 <span class="keyword">namespace </span>ChartV2
  98. <a name="l00040"></a>00040 {
  99. <a name="l00041"></a>00041 <span class="keyword">public</span> delegate <span class="keywordtype">void</span> <a class="code" href="namespace_chart_v2.html#a0071b225e41182def474138d73eca406">Button_Search_Complete_</a>();
  100. <a name="l00042"></a>00042 <span class="keyword">public</span> delegate List&lt;TF&gt; <a class="code" href="namespace_chart_v2.html#aa5a97b8f432b6133421114a36966a50b">Active_Charts</a>(<a class="code" href="namespace_chart_v2.html#a813b22baa4da3db343ab2ee8f39c442b">ChartType</a> ct);
  101. <a name="l00043"></a>00043 <span class="keyword">public</span> delegate <span class="keywordtype">void</span> <a class="code" href="namespace_chart_v2.html#a125a51f817f70f74de68944d4e989fc2">Switch_charts</a>(<span class="keywordtype">string</span> s, List&lt;TF&gt; lstr);
  102. <a name="l00044"></a>00044 <span class="keyword">public</span> delegate <span class="keywordtype">void</span> <a class="code" href="namespace_chart_v2.html#af77e6c710756f3d6b472ecbfba0639e1">RefreshPlot</a>();
  103. <a name="l00045"></a>00045 <span class="keyword">public</span> delegate <span class="keywordtype">void</span> <a class="code" href="namespace_chart_v2.html#a11a40d153876bb695d583c4b37a00588">RefreshTopAxis</a>();
  104. <a name="l00046"></a>00046
  105. <a name="l00047"></a><a class="code" href="class_chart_v2_1_1_control.html">00047</a> <span class="keyword">public</span> <span class="keyword">partial class </span><a class="code" href="class_chart_v2_1_1_control.html">Control</a> : UserControl
  106. <a name="l00048"></a>00048 {
  107. <a name="l00049"></a><a class="code" href="class_chart_v2_1_1_control.html#aa3518ca515333c5795383e2a2f52ab4c">00049</a> <span class="keyword">public</span> <span class="keyword">event</span> <a class="code" href="namespace_chart_v2.html#aa5a97b8f432b6133421114a36966a50b">Active_Charts</a> Active_Charts_;
  108. <a name="l00050"></a><a class="code" href="class_chart_v2_1_1_control.html#a6a8265c844f9ef6548399bc9ea3d8d1e">00050</a> <span class="keyword">public</span> <span class="keyword">event</span> <a class="code" href="namespace_chart_v2.html#a125a51f817f70f74de68944d4e989fc2">Switch_charts</a> Switch_charts_;
  109. <a name="l00051"></a>00051
  110. <a name="l00052"></a><a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">00052</a> <span class="keyword">public</span> GridSplitter.GridSplitter <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>;
  111. <a name="l00053"></a>00053 <span class="keyword">private</span> <a class="code" href="namespace_chart_v2.html#a725d1bb65140618909cf4992d9fd1b33">CursorType</a> cursor = <a class="code" href="namespace_chart_v2.html#a725d1bb65140618909cf4992d9fd1b33">CursorType</a>.Arrow;
  112. <a name="l00054"></a>00054 <span class="keyword">private</span> <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a> drawingTool = <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>.None;
  113. <a name="l00055"></a>00055 <span class="keyword">private</span> <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a> <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>
  114. <a name="l00056"></a>00056 {
  115. <a name="l00057"></a>00057 <span class="keyword">get</span> { <span class="keywordflow">return</span> drawingTool; }
  116. <a name="l00058"></a>00058 <span class="keyword">set</span>
  117. <a name="l00059"></a>00059 {
  118. <a name="l00060"></a>00060 <span class="keywordflow">if</span> (!<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.IsInEditingExistingLine &amp;&amp; <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList!=null)
  119. <a name="l00061"></a>00061 {
  120. <a name="l00062"></a>00062 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedObj = null;
  121. <a name="l00063"></a>00063 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex = null;
  122. <a name="l00064"></a>00064 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.DoesParallelDisplacementNeeded = <span class="keyword">false</span>;
  123. <a name="l00065"></a>00065 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList.Count; i++)
  124. <a name="l00066"></a>00066 {
  125. <a name="l00067"></a>00067 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[i].IsSelected = <span class="keyword">false</span>;
  126. <a name="l00068"></a>00068 }
  127. <a name="l00069"></a>00069 }
  128. <a name="l00070"></a>00070 drawingTool = value;
  129. <a name="l00071"></a>00071 }
  130. <a name="l00072"></a>00072 }
  131. <a name="l00073"></a>00073
  132. <a name="l00074"></a><a class="code" href="class_chart_v2_1_1_control.html#a4996287b8b133807f39c2a69cd30eefd">00074</a> <span class="keyword">public</span> Axis_Plot.CursorInfoLable <a class="code" href="class_chart_v2_1_1_control.html#a4996287b8b133807f39c2a69cd30eefd">tempTargetLable</a>;
  133. <a name="l00075"></a>00075 <span class="keyword">private</span> PointF currentCursorLocation;
  134. <a name="l00076"></a>00076 <span class="keyword">private</span> PointF lastCursorLocation;
  135. <a name="l00077"></a>00077 <span class="keyword">private</span> PointF pt1;
  136. <a name="l00078"></a>00078 <span class="keyword">private</span> PointF pt2;
  137. <a name="l00079"></a>00079 <span class="keyword">private</span> RectangleF tempRect;
  138. <a name="l00080"></a>00080 <span class="keyword">private</span> <span class="keywordtype">bool</span> IsCrtlPressed;
  139. <a name="l00081"></a>00081 <span class="keyword">private</span> Graphics drawingToolCanvas;
  140. <a name="l00082"></a>00082
  141. <a name="l00083"></a>00083 <span class="keyword">private</span> Image drawingToolBmp;
  142. <a name="l00084"></a>00084 Skilful.Working workingForm;
  143. <a name="l00085"></a><a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">00085</a> <span class="keyword">public</span> List&lt;Data.Series&gt; <a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>;
  144. <a name="l00086"></a><a class="code" href="class_chart_v2_1_1_control.html#a254ddfc44a32c577e2f38d28c652e7a1">00086</a> <span class="keyword">public</span> List&lt;Bar&gt; <a class="code" href="class_chart_v2_1_1_control.html#a254ddfc44a32c577e2f38d28c652e7a1">bar</a>;
  145. <a name="l00087"></a>00087 <span class="comment">//public BackgroundWorker bgWorker;</span>
  146. <a name="l00088"></a>00088 <span class="comment">//public bool flagSerch;</span>
  147. <a name="l00089"></a>00089
  148. <a name="l00090"></a>00090 <span class="comment">//public void _backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)</span>
  149. <a name="l00091"></a>00091 <span class="comment">//{</span>
  150. <a name="l00092"></a>00092 <span class="comment">// workingForm.SearchModel2(false, true);</span>
  151. <a name="l00093"></a>00093 <span class="comment">//}</span>
  152. <a name="l00094"></a>00094
  153. <a name="l00095"></a>00095 <span class="comment">//public void _backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)</span>
  154. <a name="l00096"></a>00096 <span class="comment">//{</span>
  155. <a name="l00097"></a>00097 <span class="comment">// if (workingForm.ActiveChart == this)</span>
  156. <a name="l00098"></a>00098 <span class="comment">// workingForm._progressBar.Value = workingForm._progressBar.Maximum - e.ProgressPercentage;</span>
  157. <a name="l00099"></a>00099 <span class="comment">// workingForm._progressBar.Visible = true;</span>
  158. <a name="l00100"></a>00100 <span class="comment">//}</span>
  159. <a name="l00101"></a>00101
  160. <a name="l00102"></a><a class="code" href="class_chart_v2_1_1_control.html#ae84c845a23fe62ba1d45e4ccee26fd5a">00102</a> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_chart_v2_1_1_control.html#ae84c845a23fe62ba1d45e4ccee26fd5a">c_smi</a>(<span class="keywordtype">int</span>[] ModelIndexes)
  161. <a name="l00103"></a>00103 {
  162. <a name="l00104"></a>00104 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; ModelIndexes.Length; i++)
  163. <a name="l00105"></a>00105 <a class="code" href="class_chart_v2_1_1_model.html">Model</a>.selectedModelIndexes.Add(ModelIndexes[i]);
  164. <a name="l00106"></a>00106 <a class="code" href="class_chart_v2_1_1_model.html">Model</a>.lastSelectedModelIndex = ModelIndexes[ModelIndexes.Length - 1];
  165. <a name="l00107"></a>00107 }
  166. <a name="l00108"></a>00108
  167. <a name="l00109"></a>00109 <span class="keyword">public</span> List&lt;Skilful.ModelManager.THTangentLine&gt; <a class="code" href="class_chart_v2_1_1_control.html#ac8e6451700b9220c710db56264734094">HTList</a>
  168. <a name="l00110"></a><a class="code" href="class_chart_v2_1_1_control.html#ac8e6451700b9220c710db56264734094">00110</a> {
  169. <a name="l00111"></a>00111 <span class="keyword">set</span>
  170. <a name="l00112"></a>00112 {
  171. <a name="l00113"></a>00113
  172. <a name="l00114"></a>00114 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.HTtoDrawList == null)
  173. <a name="l00115"></a>00115 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.HTtoDrawList = <span class="keyword">new</span> List&lt;HTargetLine&gt;();
  174. <a name="l00116"></a>00116
  175. <a name="l00117"></a>00117 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; value.Count; i++)
  176. <a name="l00118"></a>00118 {
  177. <a name="l00119"></a>00119
  178. <a name="l00120"></a>00120 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.HTtoDrawList.Add(<span class="keyword">new</span> <a class="code" href="class_chart_v2_1_1_h_target_line.html">HTargetLine</a>(value[i]));
  179. <a name="l00121"></a>00121
  180. <a name="l00122"></a>00122
  181. <a name="l00123"></a>00123 }
  182. <a name="l00124"></a>00124 }
  183. <a name="l00125"></a>00125 }
  184. <a name="l00126"></a>00126
  185. <a name="l00127"></a>00127
  186. <a name="l00128"></a>00128 <span class="keyword">public</span> List&lt;Skilful.ModelManager.TModel&gt; <a class="code" href="class_chart_v2_1_1_control.html#adc87297cbd7569eccd6fb81a0b2a36f7">ModelList2</a>
  187. <a name="l00129"></a><a class="code" href="class_chart_v2_1_1_control.html#adc87297cbd7569eccd6fb81a0b2a36f7">00129</a> {
  188. <a name="l00130"></a>00130 <span class="comment">//get { return plot.modelsToDrawList; } </span>
  189. <a name="l00131"></a>00131 <span class="keyword">set</span>
  190. <a name="l00132"></a>00132 {
  191. <a name="l00133"></a>00133 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList == null)
  192. <a name="l00134"></a>00134 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList = <span class="keyword">new</span> List&lt;Model&gt;();
  193. <a name="l00135"></a>00135 <span class="keywordtype">int</span> kk = 0;
  194. <a name="l00136"></a>00136 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; value.Count; i++)
  195. <a name="l00137"></a>00137 {
  196. <a name="l00138"></a>00138 <span class="keywordflow">if</span> (value[i].CurrentPoint &gt; 3)
  197. <a name="l00139"></a>00139 {
  198. <a name="l00140"></a>00140 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList.Add(<span class="keyword">new</span> <a class="code" href="class_chart_v2_1_1_model.html">Model</a>(value[i], GlobalMembersTAmodel.cl[kk % 11]));
  199. <a name="l00141"></a>00141 kk++;
  200. <a name="l00142"></a>00142 }
  201. <a name="l00143"></a>00143 }
  202. <a name="l00144"></a>00144 }
  203. <a name="l00145"></a>00145 }
  204. <a name="l00146"></a>00146
  205. <a name="l00147"></a>00147 <span class="keyword">public</span> <span class="keywordtype">bool</span> <a class="code" href="class_chart_v2_1_1_control.html#acaad9ca91e16e0e30c576c0c91e2470b">ModelListExist</a>
  206. <a name="l00148"></a><a class="code" href="class_chart_v2_1_1_control.html#acaad9ca91e16e0e30c576c0c91e2470b">00148</a> {
  207. <a name="l00149"></a>00149 <span class="keyword">get</span>
  208. <a name="l00150"></a>00150 {
  209. <a name="l00151"></a>00151 <span class="keywordflow">return</span> <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList != null;
  210. <a name="l00152"></a>00152 }
  211. <a name="l00153"></a>00153 }
  212. <a name="l00154"></a>00154
  213. <a name="l00155"></a><a class="code" href="class_chart_v2_1_1_control.html#a64c7e98024f9934d20d208991ca36fb4">00155</a> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_chart_v2_1_1_control.html#a64c7e98024f9934d20d208991ca36fb4" title="Очистка списка моделей.">ModelListClear</a>()
  214. <a name="l00156"></a>00156 {
  215. <a name="l00157"></a>00157 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList != null) <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.modelsToDrawList.Clear();
  216. <a name="l00158"></a>00158 }
  217. <a name="l00159"></a>00159
  218. <a name="l00160"></a><a class="code" href="class_chart_v2_1_1_control.html#a0b90ef5d89a776eae8ed62840396bd56">00160</a> <span class="keyword">public</span> Axis_Plot.Axis <a class="code" href="class_chart_v2_1_1_control.html#a0b90ef5d89a776eae8ed62840396bd56">leftAxis</a>;
  219. <a name="l00161"></a><a class="code" href="class_chart_v2_1_1_control.html#afbe0821c71d4beb745f19feff118f20d">00161</a> <span class="keyword">public</span> Axis_Plot.Axis <a class="code" href="class_chart_v2_1_1_control.html#afbe0821c71d4beb745f19feff118f20d">rightAxis</a>;
  220. <a name="l00162"></a><a class="code" href="class_chart_v2_1_1_control.html#a786bda890fbcb0aa0a9ad38baf536aea">00162</a> <span class="keyword">public</span> Axis_Plot.Axis <a class="code" href="class_chart_v2_1_1_control.html#a786bda890fbcb0aa0a9ad38baf536aea">bottomAxis</a>;
  221. <a name="l00163"></a><a class="code" href="class_chart_v2_1_1_control.html#a90be78ac31b86db47a8efdbaf4ca73cf">00163</a> <span class="keyword">public</span> Axis_Plot.Axis <a class="code" href="class_chart_v2_1_1_control.html#a90be78ac31b86db47a8efdbaf4ca73cf">topAxis</a>;
  222. <a name="l00164"></a><a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">00164</a> <span class="keyword">public</span> Axis_Plot.Plot <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>;
  223. <a name="l00165"></a><a class="code" href="class_chart_v2_1_1_control.html#ad45f73c0bd69e875b36c92bf93c0b7c8">00165</a> <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="class_chart_v2_1_1_control.html#ad45f73c0bd69e875b36c92bf93c0b7c8">dragSpeed</a> = 2;
  224. <a name="l00166"></a>00166 <span class="comment">//temp vars</span>
  225. <a name="l00167"></a>00167 <span class="keyword">private</span> <span class="keywordtype">float</span> tempTimeVar;
  226. <a name="l00168"></a>00168 <span class="keyword">private</span> <span class="keywordtype">float</span> tempPriceVar;
  227. <a name="l00169"></a>00169 <span class="comment">// int stat = 0;</span>
  228. <a name="l00170"></a>00170
  229. <a name="l00171"></a>00171
  230. <a name="l00172"></a>00172 <span class="comment">// private System.Diagnostics.Stopwatch st = new System.Diagnostics.Stopwatch();</span>
  231. <a name="l00173"></a>00173
  232. <a name="l00174"></a><a class="code" href="class_chart_v2_1_1_control.html#a382a1c0da2bd5c9c5b17e0a795b9e249">00174</a> <span class="keyword">public</span> <a class="code" href="class_chart_v2_1_1_control.html#a382a1c0da2bd5c9c5b17e0a795b9e249">Control</a>( Size tempSize,Point tempPoint, Skilful.Working working)
  233. <a name="l00175"></a>00175 <span class="comment">// public Control( )</span>
  234. <a name="l00176"></a>00176 {
  235. <a name="l00177"></a>00177 workingForm = working;
  236. <a name="l00178"></a>00178 <span class="comment">// this.gridSplitter = new GridSplitter.GridSplitterV4(new Size(100, 100));</span>
  237. <a name="l00179"></a>00179 this.SetStyle(ControlStyles.SupportsTransparentBackColor, <span class="keyword">true</span>);
  238. <a name="l00180"></a>00180 this.SetStyle(ControlStyles.SupportsTransparentBackColor, <span class="keyword">true</span>);
  239. <a name="l00181"></a>00181 this.SetStyle(ControlStyles.Selectable, <span class="keyword">true</span>);
  240. <a name="l00182"></a>00182
  241. <a name="l00183"></a>00183 InitializeComponent();
  242. <a name="l00184"></a>00184
  243. <a name="l00185"></a>00185 this.Size = tempSize;
  244. <a name="l00186"></a>00186 this.Location = tempPoint;
  245. <a name="l00187"></a>00187
  246. <a name="l00188"></a>00188 GridSplitterInitialization();
  247. <a name="l00189"></a>00189
  248. <a name="l00190"></a>00190 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a> = <span class="keyword">new</span> Axis_Plot.Plot(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[4]);
  249. <a name="l00191"></a>00191 <a class="code" href="class_chart_v2_1_1_control.html#afbe0821c71d4beb745f19feff118f20d">rightAxis</a> = <span class="keyword">new</span> Axis_Plot.RightAxisDinamic(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[7]);
  250. <a name="l00192"></a>00192 <a class="code" href="class_chart_v2_1_1_control.html#a0b90ef5d89a776eae8ed62840396bd56">leftAxis</a> = <span class="keyword">new</span> Axis_Plot.LeftAxisDinamic(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[1]);
  251. <a name="l00193"></a>00193 <a class="code" href="class_chart_v2_1_1_control.html#a786bda890fbcb0aa0a9ad38baf536aea">bottomAxis</a> = <span class="keyword">new</span> Axis_Plot.BottomAxisStatic(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[5]);
  252. <a name="l00194"></a>00194 <a class="code" href="class_chart_v2_1_1_control.html#a90be78ac31b86db47a8efdbaf4ca73cf">topAxis</a> = <span class="keyword">new</span> Axis_Plot.TopAxisAsInfoPanel(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[3], <span class="keyword">this</span>);
  253. <a name="l00195"></a>00195
  254. <a name="l00196"></a>00196 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.grid = <span class="keyword">new</span> Axis_Plot.Grid();
  255. <a name="l00197"></a>00197 <a class="code" href="class_chart_v2_1_1_control.html#afbe0821c71d4beb745f19feff118f20d">rightAxis</a>.grid = <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.grid;
  256. <a name="l00198"></a>00198 <a class="code" href="class_chart_v2_1_1_control.html#a0b90ef5d89a776eae8ed62840396bd56">leftAxis</a>.grid = <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.grid;
  257. <a name="l00199"></a>00199 <a class="code" href="class_chart_v2_1_1_control.html#a786bda890fbcb0aa0a9ad38baf536aea">bottomAxis</a>.grid = <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.grid;
  258. <a name="l00200"></a>00200
  259. <a name="l00201"></a>00201
  260. <a name="l00202"></a>00202
  261. <a name="l00203"></a>00203 <span class="comment">//Serialization.CustomSerializer.Serialize(&quot;C:\\dd2.txt&quot;,plot);</span>
  262. <a name="l00204"></a>00204 <span class="comment">// Axis_Plot.Plot plott = (Axis_Plot.Plot)Serialization.CustomSerializer.DeSerialize(&quot;C:\\dd2.txt&quot;);</span>
  263. <a name="l00205"></a>00205 }
  264. <a name="l00206"></a>00206
  265. <a name="l00207"></a>00207 <span class="keyword">private</span> <span class="keywordtype">void</span> GridSplitterInitialization()
  266. <a name="l00208"></a>00208 {
  267. <a name="l00209"></a>00209
  268. <a name="l00210"></a>00210 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a> = <span class="keyword">new</span> GridSplitter.GridSplitter(20, 20, 20, 20);
  269. <a name="l00211"></a>00211 this.Controls.Add(this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>);
  270. <a name="l00212"></a>00212 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.BackColor = System.Drawing.Color.WhiteSmoke;
  271. <a name="l00213"></a>00213 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.BottomAxisHeight = 20;
  272. <a name="l00214"></a>00214 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.Dock = System.Windows.Forms.DockStyle.Fill;
  273. <a name="l00215"></a>00215 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.LeftAxisWidth = 20;
  274. <a name="l00216"></a>00216 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.Location = <span class="keyword">new</span> System.Drawing.Point(0, 0);
  275. <a name="l00217"></a>00217 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.Name = <span class="stringliteral">&quot;gridSplitter&quot;</span>;
  276. <a name="l00218"></a>00218 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.RightAxisWidth = 20;
  277. <a name="l00219"></a>00219 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.Size = <span class="keyword">new</span> System.Drawing.Size(685, 355);
  278. <a name="l00220"></a>00220 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.TabIndex = 0;
  279. <a name="l00221"></a>00221 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.TopAxisHeight = 20;
  280. <a name="l00222"></a>00222 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.ResizingBottomAxis += <span class="keyword">new</span> GridSplitter.GridSplitter.MouseDelegat(this.gridSplitter_DraggingBottomAxis);
  281. <a name="l00223"></a>00223 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.Paint += <span class="keyword">new</span> System.Windows.Forms.PaintEventHandler(this.gridSplitter_Paint);
  282. <a name="l00224"></a>00224 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.ResizingLeftAxis += <span class="keyword">new</span> GridSplitter.GridSplitter.MouseDelegat(this.gridSplitter_DraggingLeftAxis);
  283. <a name="l00225"></a>00225 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.PreviewKeyDown += <span class="keyword">new</span> System.Windows.Forms.PreviewKeyDownEventHandler(this.gridSplitter_PreviewKeyDown);
  284. <a name="l00226"></a>00226 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.ResizingRightAxis += <span class="keyword">new</span> GridSplitter.GridSplitter.MouseDelegat(this.gridSplitter_DraggingRightAxis);
  285. <a name="l00227"></a>00227 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.MouseMove += <span class="keyword">new</span> System.Windows.Forms.MouseEventHandler(this.gridSplitter_MouseMove);
  286. <a name="l00228"></a>00228 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.ResizingTopAxis += <span class="keyword">new</span> GridSplitter.GridSplitter.MouseDelegat(this.gridSplitter_DraggingTopAxis);
  287. <a name="l00229"></a>00229 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.MouseDoubleClick += <span class="keyword">new</span> System.Windows.Forms.MouseEventHandler(this.gridSplitter_MouseDoubleClick);
  288. <a name="l00230"></a>00230 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.KeyUp += <span class="keyword">new</span> System.Windows.Forms.KeyEventHandler(this.gridSplitter_KeyUp);
  289. <a name="l00231"></a>00231 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.MouseClick += <span class="keyword">new</span> System.Windows.Forms.MouseEventHandler(this.gridSplitter_MouseClick);
  290. <a name="l00232"></a>00232 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.DraggingEvent += <span class="keyword">new</span> GridSplitter.GridSplitter.MouseDelegat(this.gridSplitter_DraggingNothing);
  291. <a name="l00233"></a>00233 this.<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.KeyDown += <span class="keyword">new</span> System.Windows.Forms.KeyEventHandler(this.gridSplitter_KeyDown);
  292. <a name="l00234"></a>00234 }
  293. <a name="l00235"></a>00235
  294. <a name="l00236"></a><a class="code" href="class_chart_v2_1_1_control.html#a9a48d81d94c6bf8d9d6dca746f518e12">00236</a> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_chart_v2_1_1_control.html#a9a48d81d94c6bf8d9d6dca746f518e12">SetTopAxisHeight</a>(<span class="keywordtype">int</span> height)
  295. <a name="l00237"></a>00237 {
  296. <a name="l00238"></a>00238 <span class="keywordflow">if</span>(<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.TopAxisHeight != height)
  297. <a name="l00239"></a>00239 <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.TopAxisHeight = height;
  298. <a name="l00240"></a>00240 }
  299. <a name="l00241"></a>00241
  300. <a name="l00242"></a>00242
  301. <a name="l00243"></a><a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">00243</a> <span class="keyword">public</span> List&lt;TF&gt; <a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">str__</a>;
  302. <a name="l00244"></a>00244 <span class="keyword">private</span> <span class="keywordtype">void</span> gridSplitter_MouseClick(<span class="keywordtype">object</span> sender, MouseEventArgs e)
  303. <a name="l00245"></a>00245 {
  304. <a name="l00246"></a>00246
  305. <a name="l00247"></a>00247
  306. <a name="l00248"></a>00248 <span class="keywordflow">if</span> (e.Button == MouseButtons.Right)
  307. <a name="l00249"></a>00249 {
  308. <a name="l00250"></a>00250 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.IsWaitingMouseClickToStoreLine = <span class="keyword">false</span>;
  309. <a name="l00251"></a>00251 <span class="keywordflow">if</span> (<a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a> == <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>.None)
  310. <a name="l00252"></a>00252 {
  311. <a name="l00253"></a>00253 <span class="keywordflow">switch</span> (<a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.clickedCellIndex)
  312. <a name="l00254"></a>00254 {
  313. <a name="l00255"></a>00255 <span class="keywordflow">case</span> 3:
  314. <a name="l00256"></a>00256 ContextMenuStrip contextChartsmenu = <span class="keyword">new</span> ContextMenuStrip();
  315. <a name="l00257"></a>00257 contextChartsmenu.Items.Add(<span class="stringliteral">&quot;Close this&quot;</span>);
  316. <a name="l00258"></a>00258 contextChartsmenu.Items[0].Click += <span class="keyword">new</span> EventHandler(Control_Click);
  317. <a name="l00259"></a>00259 contextChartsmenu.Items[0].Image = Skilful.Properties.Resources.gtk_close;
  318. <a name="l00260"></a>00260 contextChartsmenu.Items.Add(<span class="keyword">new</span> ToolStripSeparator());
  319. <a name="l00261"></a>00261 <a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">str__</a> = <a class="code" href="class_chart_v2_1_1_control.html#aa3518ca515333c5795383e2a2f52ab4c">Active_Charts_</a>(this.<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].legend.chartType);
  320. <a name="l00262"></a>00262 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">str__</a>.Count == 1) contextChartsmenu.Items[0].Enabled = <span class="keyword">false</span>;
  321. <a name="l00263"></a>00263 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">str__</a>.Count; i++)
  322. <a name="l00264"></a>00264 {
  323. <a name="l00265"></a>00265 contextChartsmenu.Items.Add(<a class="code" href="class_chart_v2_1_1_control.html#ae63b308f5c60b2c4cc5fc41aea09389a">str__</a>[i].ToString());
  324. <a name="l00266"></a>00266 contextChartsmenu.Items[2+i].Click += <span class="keyword">new</span> EventHandler(Control_Click);
  325. <a name="l00267"></a>00267 }
  326. <a name="l00268"></a>00268
  327. <a name="l00269"></a>00269 contextChartsmenu.Show(<span class="keyword">this</span>, e.Location);
  328. <a name="l00270"></a>00270 <span class="keywordflow">break</span>;
  329. <a name="l00271"></a>00271 <span class="keywordflow">case</span> 4:
  330. <a name="l00272"></a>00272 plotContextMenu.Show(<span class="keyword">this</span>, e.Location);
  331. <a name="l00273"></a>00273 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a> != null)
  332. <a name="l00274"></a>00274 {
  333. <a name="l00275"></a>00275 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; plotContextMenu.Items.Count; i++)
  334. <a name="l00276"></a>00276 {
  335. <a name="l00277"></a>00277 plotContextMenu.Items[i].Enabled = <span class="keyword">true</span>;
  336. <a name="l00278"></a>00278 }
  337. <a name="l00279"></a>00279
  338. <a name="l00280"></a>00280 }
  339. <a name="l00281"></a>00281 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a> == null)
  340. <a name="l00282"></a>00282 {
  341. <a name="l00283"></a>00283 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; plotContextMenu.Items.Count; i++)
  342. <a name="l00284"></a>00284 {
  343. <a name="l00285"></a>00285 plotContextMenu.Items[i].Enabled = <span class="keyword">false</span>;
  344. <a name="l00286"></a>00286 }
  345. <a name="l00287"></a>00287
  346. <a name="l00288"></a>00288 }
  347. <a name="l00289"></a>00289 <span class="keywordflow">break</span>;
  348. <a name="l00290"></a>00290
  349. <a name="l00291"></a>00291 }
  350. <a name="l00292"></a>00292 }
  351. <a name="l00293"></a>00293 <span class="keywordflow">else</span>
  352. <a name="l00294"></a>00294 {
  353. <a name="l00295"></a>00295 <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a> = <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>.None;
  354. <a name="l00296"></a>00296
  355. <a name="l00297"></a>00297 }
  356. <a name="l00298"></a>00298 }
  357. <a name="l00299"></a>00299 <span class="keywordflow">else</span>
  358. <a name="l00300"></a>00300 <span class="keywordflow">if</span> (e.Button == MouseButtons.Left)
  359. <a name="l00301"></a>00301 {
  360. <a name="l00302"></a>00302 <span class="keywordflow">if</span> (e.X &gt; (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.bmp.Width + <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[4].Location.X )|| e.Y &gt; (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.bmp.Height + <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[4].Location.Y) || e.X &lt; <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[1].Width || e.Y &lt; <a class="code" href="class_chart_v2_1_1_control.html#ab06c9f16e51e4d31b1a2701a3b43c1e3">gridSplitter</a>.cell[3].Height)
  361. <a name="l00303"></a>00303 {
  362. <a name="l00304"></a>00304 <span class="comment">//щелчок не попал в область гарфика. а зашел на область ОСИ Y.</span>
  363. <a name="l00305"></a>00305 <span class="keywordtype">int</span> d = 0;
  364. <a name="l00306"></a>00306 d++;
  365. <a name="l00307"></a>00307 }
  366. <a name="l00308"></a>00308 <span class="keywordflow">else</span>
  367. <a name="l00309"></a>00309 {
  368. <a name="l00310"></a>00310 <span class="comment">//сохраняем линию в массиве</span>
  369. <a name="l00311"></a>00311 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.IsWaitingMouseClickToStoreLine)
  370. <a name="l00312"></a>00312 {
  371. <a name="l00313"></a>00313 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList == null)
  372. <a name="l00314"></a>00314 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList = <span class="keyword">new</span> List&lt;Data.UserLine&gt;();
  373. <a name="l00315"></a>00315
  374. <a name="l00316"></a>00316
  375. <a name="l00317"></a>00317 <span class="keywordflow">switch</span> (<a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>)
  376. <a name="l00318"></a>00318 {
  377. <a name="l00319"></a>00319
  378. <a name="l00320"></a>00320
  379. <a name="l00321"></a>00321 <span class="keywordflow">case</span> <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>.VerticalLine:
  380. <a name="l00322"></a>00322 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedObj != null)
  381. <a name="l00323"></a>00323 {
  382. <a name="l00324"></a>00324
  383. <a name="l00325"></a>00325 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].IntPt1 = <span class="keyword">new</span> Point((<span class="keywordtype">int</span>)<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToBarNumber(currentCursorLocation.X), 0);
  384. <a name="l00326"></a>00326 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].IntPt2 = <span class="keyword">new</span> Point((<span class="keywordtype">int</span>)<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToBarNumber(currentCursorLocation.X), 0);
  385. <a name="l00327"></a>00327 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].IsVisible = <span class="keyword">true</span>;
  386. <a name="l00328"></a>00328 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedObj = null;
  387. <a name="l00329"></a>00329
  388. <a name="l00330"></a>00330
  389. <a name="l00331"></a>00331 }
  390. <a name="l00332"></a>00332 <span class="keywordflow">else</span>
  391. <a name="l00333"></a>00333 {
  392. <a name="l00334"></a>00334 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList.Add(<span class="keyword">new</span> <a class="code" href="class_chart_v2_1_1_control.html#a8dc366ecc7093630348900c61f6cd768">VerticalLine</a>(<span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToBarNumber(currentCursorLocation.X), 0), <span class="keyword">new</span> PointF(<a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToBarNumber(currentCursorLocation.X), 0), <span class="keyword">new</span> ChartV2.Styles.UserLineStyle(<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.pen)));
  393. <a name="l00335"></a>00335 }
  394. <a name="l00336"></a>00336 <span class="keywordflow">break</span>;
  395. <a name="l00337"></a>00337
  396. <a name="l00338"></a>00338
  397. <a name="l00339"></a>00339
  398. <a name="l00340"></a>00340 <span class="keywordflow">case</span> <a class="code" href="namespace_chart_v2.html#a3016ec0960f22b0b8806b6cab3839e48">DrawingTool</a>.HorizontalLine:
  399. <a name="l00341"></a>00341 <span class="keywordflow">if</span> (<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedObj != null)
  400. <a name="l00342"></a>00342 {
  401. <a name="l00343"></a>00343 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].pt1 = <span class="keyword">new</span> PointF(0, <a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToPrice(currentCursorLocation.Y));
  402. <a name="l00344"></a>00344 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].pt2 = <span class="keyword">new</span> PointF(0, <a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToPrice(currentCursorLocation.Y));
  403. <a name="l00345"></a>00345 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList[(int)<a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedLineIndex].IsVisible = <span class="keyword">true</span>;
  404. <a name="l00346"></a>00346 <a class="code" href="class_chart_v2_1_1_data_1_1_user_line.html">UserLine</a>.selectedObj = null;
  405. <a name="l00347"></a>00347 }
  406. <a name="l00348"></a>00348 <span class="keywordflow">else</span>
  407. <a name="l00349"></a>00349 {
  408. <a name="l00350"></a>00350 <a class="code" href="class_chart_v2_1_1_control.html#aabbc2b56c0c55b0ecb7aae8dd0071379">plot</a>.graphToolsToDrawList.Add(<span class="keyword">new</span> <a class="code" href="class_chart_v2_1_1_control.html#a04b5df8311284049e4dcb09f0e49b2de">HorizontalLine</a>(<span class="keyword">new</span> PointF(0, <a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa8b3b2e57aaf4f04a3">seriesList</a>[0].viewPort.PixelToPrice(currentCursorLocation.Y)), <span class="keyword">new</span> PointF(0, <a class="code" href="class_chart_v2_1_1_control.html#a52c907f945d2dfa…

Large files files are truncated, but you can click here to view the full file