コード例 #1
0
ファイル: SpreadEntry.cs プロジェクト: jinpan/Traders_IAP
 public SpreadEntry(TTSFormState state)
     : base(state)
 {
     this.InitializeComponent();
     SpreadEntryPanel spreadEntryPanel = new SpreadEntryPanel(true);
     SpreadEntryPanel expr_17 = spreadEntryPanel;
     expr_17.AddSpreadEntryPanelClick = (Action)System.Delegate.Combine(expr_17.AddSpreadEntryPanelClick, delegate
     {
         this.AddSpreadEntryPanel();
     });
     this.SpreadEntryPanelTableLayout.Controls.Add(spreadEntryPanel);
     if (state != null && state.State != null)
     {
         try
         {
             Tuple<string, decimal, string, decimal>[] array = (Tuple<string, decimal, string, decimal>[])state.State;
             for (int i = 0; i < array.Length; i++)
             {
                 if (i > 0)
                 {
                     spreadEntryPanel = this.AddSpreadEntryPanel();
                 }
                 spreadEntryPanel.SetState(array[i]);
             }
         }
         catch
         {
         }
     }
 }
コード例 #2
0
ファイル: SpreadEntry.cs プロジェクト: jinpan/Traders_IAP
 private SpreadEntryPanel AddSpreadEntryPanel()
 {
     SpreadEntryPanel spreadEntryPanel = new SpreadEntryPanel(false);
     SpreadEntryPanel expr_08 = spreadEntryPanel;
     expr_08.RemoveSpreadEntryPanelClick = (System.Action<SpreadEntryPanel>)System.Delegate.Combine(expr_08.RemoveSpreadEntryPanelClick, delegate(SpreadEntryPanel sender)
     {
         int row = this.SpreadEntryPanelTableLayout.GetRow(sender);
         this.SpreadEntryPanelTableLayout.Controls.Remove(sender);
         for (int i = row; i < this.SpreadEntryPanelTableLayout.Controls.Count; i++)
         {
             this.SpreadEntryPanelTableLayout.SetRow(this.SpreadEntryPanelTableLayout.Controls[i], i);
         }
         this.SpreadEntryPanelTableLayout.RowCount = this.SpreadEntryPanelTableLayout.Controls.Count;
     });
     this.SpreadEntryPanelTableLayout.RowCount++;
     this.SpreadEntryPanelTableLayout.Controls.Add(spreadEntryPanel, 0, this.SpreadEntryPanelTableLayout.RowCount - 1);
     return spreadEntryPanel;
 }