private bool CheckConnection() { if (this.Service == null) { //if (OnRequestConnection != null) //{ // var args = new RequestConnectionEventArgs // { // ActionName = "Load", // Control = this // }; // OnRequestConnection(this, args); //} var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; RaiseRequestConnectionEvent(args); return(false); } else { return(true); } }
public AttributeEditor() { InitializeComponent(); // Setup ViewModel _vm = new AttributeEditorViewModel(new TestableMetadataHelper()); _vm.OnRequestConnection += (sender, args) => { var arg = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; RaiseRequestConnectionEvent(arg); }; _vm.OnEntitiesListChanged += (sender, args) => { cmbEntities.Items.Clear(); cmbEntities.DisplayMember = "DisplayName"; cmbEntities.ValueMember = "SchemaName"; cmbEntities.Items.AddRange(_vm.Entities.ToArray()); }; _vm.OnWorkingStateChanged += (sender, args) => { ManageWorkingState(_vm.WorkingState); }; _vm.OnGetInformationPanel += (sender, args) => { args.Panel = InformationPanel.GetInformationPanel(this, args.Message, args.Width, args.Height); }; _vm.OnShowMessageBox += (sender, args) => { MessageBox.Show(this, args.Message, args.Caption, args.Buttons, args.Icon); }; }
/// <summary> /// open the window to select a source connection /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void selectSourceButton_Click(object sender, EventArgs e) { var args = new RequestConnectionEventArgs { ActionName = "SourceOrganization", Control = this }; RaiseRequestConnectionEvent(args); }
private void ConnectObjectExplorer() { var args = new RequestConnectionEventArgs { ActionName = "ConnectObjectExplorer", Control = this }; OnConnectionRequested(this, args); }
private void btnSelectTarget_Click(object sender, EventArgs e) { var args = new RequestConnectionEventArgs { ActionName = "TargetOrganization", Control = this }; RaiseRequestConnectionEvent(args); }
private void tsbChangeConnection_Click(object sender, EventArgs e) { var args = new RequestConnectionEventArgs { ActionName = "ChangeConnection", Control = this }; OnConnectionRequested(this, args); }
private void ToolStripButtonConnectClick(object sender, EventArgs e) { if (OnConnectionRequested != null) { var args = new RequestConnectionEventArgs { ActionName = "SchemaConnection", Control = (CdsMigratorPluginControl)Parent }; OnConnectionRequested(this, args); } }
private void BtnSelectTargetClick(object sender, EventArgs e) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "TargetOrganization", Control = this }; OnRequestConnection(this, args); } }
static void room_requestConnectionEvent(Room sender, RequestConnectionEventArgs e) { if (e.requesting) { foreach (Room room in rooms) { if (room.ID == e.roomID) { room.RecievedRequestFromReceivingRoom(sender.ID); } } } else if (e.sending && !e.clear) { foreach (Room room in rooms) { if (room.ID == e.roomID) { room.ReceivedReplyFromSendingRoom(sender.ID, e.inputValues, sender.Name); } } } else if (e.sending && e.clear) { foreach (Room room in rooms) { if (room.ID == e.roomID) { room.RecievedRequestFromReceiverToRemove(sender.ID); } } } else if (e.receiving && !e.clear) { foreach (Room room in rooms) { if (room.ID == e.roomID) { room.ReceivedReplyFromSendingRoom(sender.ID, e.inputValues, sender.Name); } } } else if (e.receiving && e.clear) { foreach (Room room in rooms) { if (room.ID == e.roomID || e.roomID == 0) { room.RecievedRequestFromSenderToRemove(sender.ID); } } } }
private void btnChangeTargetEnvironment_Click(object sender, EventArgs e) { if (OnRequestConnection != null) { var arg = new RequestConnectionEventArgs { ActionName = "TargetOrganization", Control = this }; OnRequestConnection(this, arg); } }
private void buttonChangeSource_Click(object sender, EventArgs e) { if (OnRequestConnection != null) { var arg = new RequestConnectionEventArgs { ActionName = "SourceOrganization", Control = this }; OnRequestConnection(this, arg); } }
private void comboBoxTargetEnvironmentList_Click(object sender, EventArgs e) { if (OnRequestConnection != null) { var aaa = new RequestConnectionEventArgs { ActionName = "TargetOrganization", Control = this }; OnRequestConnection(this, aaa); } }
private void buttonChangeTarget_Click(object sender, EventArgs e) { LogInfo("Clicked on Target Change button."); if (OnRequestConnection != null) { var arg = new RequestConnectionEventArgs { ActionName = "TargetOrganization", Control = this }; OnRequestConnection(this, arg); } }
private void tsbLoadDashboards_Click(object sender, EventArgs e) { if (service == null) { var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; RaiseRequestConnectionEvent(args); } else { PopulateSource(); } }
private bool CheckConnection() { if (this.Service == null) { var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; RaiseRequestConnectionEvent(args); return(false); } else { return(true); } }
private void TsbLoadSolutionsClick(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null }; OnRequestConnection(this, args); } } else { RetrieveSolutions(); } }
private void BtnWhoAmIClick(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null }; OnRequestConnection(this, args); } } else { ProcessWhoAmI(); } }
private void tsbLoadEntities_Click(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; OnRequestConnection(this, args); } } else { PopulateEntities(); } }
private bool CheckConnection() { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; OnRequestConnection(this, args); } return(false); } else { return(true); } }
private void viewsToolStripMenuItem_Click(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null }; OnRequestConnection(this, args); } } else { infoPanel = InformationPanel.GetInformationPanel(this, "Retrieving Views...", 340, 100); var worker = new BackgroundWorker(); worker.DoWork += WorkerLoadViews; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerLoadViewsCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); } }
private void btnExecuteWFs_Click_1(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null }; OnRequestConnection(this, args); } } else { infoPanel = InformationPanel.GetInformationPanel(this, "Executing Workflows...", 340, 100); var worker = new BackgroundWorker(); worker.DoWork += WorkerExecWFs; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerExecWFsCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); } }
private void toolStripButton1_Click(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null }; OnRequestConnection(this, args); } } else { infoPanel = InformationPanel.GetInformationPanel(this, "Counting Records in View...", 340, 100); var worker = new BackgroundWorker(); worker.DoWork += WorkerGetCounts; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerGetCountsCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); } }
private void tsbLoadEntities_Click(object sender, EventArgs e) { if (service == null) { if (OnRequestConnection != null) { var args = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; OnRequestConnection(this, args); } else { MessageBox.Show(this, "OnRequestConnection event not registered!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { LoadEntities(); } }
public void RaiseRequestConnectionEvent(RequestConnectionEventArgs args) { CallingControl.RaiseRequestConnectionEvent(args); }
private void OnConnectionRequestedHandler(object sender, RequestConnectionEventArgs e) { RaiseRequestConnectionEvent(e); }