public Component() { InitializeComponent(); this.VisibleGroup = new List <MetroFramework.Controls.MetroCheckBox>(); // // VisibleGroup // this.VisibleGroup.Add(Visible_1); this.VisibleGroup.Add(Visible_2); this.VisibleGroup.Add(Visible_3); this.VisibleGroup.Add(Visible_4); this.VisibleGroup.Add(Visible_5); this.VisibleGroup.Add(Visible_6); this.VisibleGroup.Add(Visible_7); this.VisibleGroup.Add(Visible_8); // // ClusterComponent Init // this.clusterComponent = null; }
public virtual Task <PassthroughResponse> UpdateComponent(string subscriptionId, string cloudServiceName, string resourceNamespace, string dnsName, string componentName, ClusterComponent request, CancellationToken cancellationToken) { return((Task <PassthroughResponse>)(base.CreateAndInvokeRestRequestForParentMethodAsync <PassthroughResponse>(subscriptionId, cloudServiceName, resourceNamespace, dnsName, componentName, request, cancellationToken))); }
public void ModelNotify(IModel model, ModelEventArgs e) { Console.WriteLine(string.Format("[Model -> View] {0}", e.action)); switch (e.action) { case COMMON_ACTIONS.START_LOADING: this.ChartContainer.Controls.Clear(); this.ChartContainer.Controls.Add(this.Spinner); break; case COMMON_ACTIONS.STOP_LOADING: this.ChartContainer.Controls.Clear(); break; case MODEL_ACTIONS.LOAD_EXCEL_SUCCESS: this.changed(this, new ViewEventArgs(VIEW_ACTIONS.REQUEST_DAYDATA, this.DayTabs.SelectedIndex)); break; case VIEW_ACTIONS.REQUEST_DAYDATA_SUCCESS: this.Chart.AxisX.Clear(); this.Chart.Series.Clear(); Task.Run(() => { ConfigChart(e.powerFrequencies, e.maxWh, e.timeslot); }); this.ChartContainer.Controls.Add(this.Chart); if (this.clusterComponent != null) { this.clusterComponent.Close(); this.clusterComponent.Dispose(); } this.clusterComponent = new ClusterComponent(e.clusterPowerFrequencies, e.timeslot); this.clusterComponent.Show(); break; case MODEL_ACTIONS.REQUIRE_RELOAD: LoadBtn_Click(null, null); break; case VIEW_ACTIONS.AUTO_DRAW_SUCCESS: this.UIDSearch.Text = e.keyword; this.AutoDrawBtn.Text = "Next Auto Draw"; this.changed(this, new ViewEventArgs(VIEW_ACTIONS.REQUEST_DAYDATA, this.DayTabs.SelectedIndex)); break; case VIEW_ACTIONS.AUTO_LOAD_SUCCESS: this.changed(this, new ViewEventArgs(VIEW_ACTIONS.AUTO_LOAD_NEXT, this.DayTabs.SelectedIndex)); break; case VIEW_ACTIONS.AUTO_LOAD_LAST: DataComponent last_dc = new DataComponent(e.keyword, e.powerFrequencies, e.timeslot); last_dc.Show(); break; case VIEW_ACTIONS.AUTO_LOAD_NEXT_SUCCESS: DataComponent dc = new DataComponent(e.keyword, e.powerFrequencies, e.timeslot); dc.Show(); this.changed(this, new ViewEventArgs(VIEW_ACTIONS.AUTO_LOAD)); break; case VIEW_ACTIONS.REQUEST_SIMILARDATA_SUCCESS: this.changed(this, new ViewEventArgs(VIEW_ACTIONS.REQUEST_SIMPF)); break; case VIEW_ACTIONS.REQUEST_SIMPF_SUCCESS: this.Invoke((System.Action)(() => { DataComponent sim_dc = new DataComponent(e.keyword, e.powerFrequencies, e.timeslot); sim_dc.Show(); })); break; default: break; } }