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);
        }
Beispiel #4
0
        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);
        }
Beispiel #6
0
        private void tsbChangeConnection_Click(object sender, EventArgs e)
        {
            var args = new RequestConnectionEventArgs {
                ActionName = "ChangeConnection", Control = this
            };

            OnConnectionRequested(this, args);
        }
Beispiel #7
0
 private void ToolStripButtonConnectClick(object sender, EventArgs e)
 {
     if (OnConnectionRequested != null)
     {
         var args = new RequestConnectionEventArgs {
             ActionName = "SchemaConnection", Control = (CdsMigratorPluginControl)Parent
         };
         OnConnectionRequested(this, args);
     }
 }
Beispiel #8
0
 private void BtnSelectTargetClick(object sender, EventArgs e)
 {
     if (OnRequestConnection != null)
     {
         var args = new RequestConnectionEventArgs {
             ActionName = "TargetOrganization", Control = this
         };
         OnRequestConnection(this, args);
     }
 }
Beispiel #9
0
 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);
             }
         }
     }
 }
Beispiel #10
0
 private void btnChangeTargetEnvironment_Click(object sender, EventArgs e)
 {
     if (OnRequestConnection != null)
     {
         var arg = new RequestConnectionEventArgs
         {
             ActionName = "TargetOrganization",
             Control    = this
         };
         OnRequestConnection(this, arg);
     }
 }
Beispiel #11
0
 private void buttonChangeSource_Click(object sender, EventArgs e)
 {
     if (OnRequestConnection != null)
     {
         var arg = new RequestConnectionEventArgs
         {
             ActionName = "SourceOrganization",
             Control    = this
         };
         OnRequestConnection(this, arg);
     }
 }
Beispiel #12
0
 private void comboBoxTargetEnvironmentList_Click(object sender, EventArgs e)
 {
     if (OnRequestConnection != null)
     {
         var aaa = new RequestConnectionEventArgs
         {
             ActionName = "TargetOrganization",
             Control    = this
         };
         OnRequestConnection(this, aaa);
     }
 }
Beispiel #13
0
 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();
     }
 }
Beispiel #15
0
        private bool CheckConnection()
        {
            if (this.Service == null)
            {
                var args = new RequestConnectionEventArgs {
                    ActionName = "Load", Control = this
                };
                RaiseRequestConnectionEvent(args);

                return(false);
            }
            else
            {
                return(true);
            }
        }
Beispiel #16
0
 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();
     }
 }
Beispiel #17
0
 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();
     }
 }
Beispiel #18
0
 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();
     }
 }
Beispiel #19
0
 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);
     }
 }
Beispiel #20
0
        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();
            }
        }
Beispiel #21
0
        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();
            }
        }
Beispiel #22
0
        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();
            }
        }
Beispiel #23
0
 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 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 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 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();
            }
        }
Beispiel #28
0
 private void OnConnectionRequestedHandler(object sender, RequestConnectionEventArgs e)
 {
     RaiseRequestConnectionEvent(e);
 }
 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();
     }
 }