public CVentanaProcesos(CViewsManager vm)
 {
     view                      = (vm.getFirstView("GestorProcesos.VentanaProcesos") != null)? vm.getFirstView("GestorProcesos.VentanaProcesos"): vm.AddView("GestorProcesos.VentanaProcesos");
     VentanaProcesos           = (System.Windows.Forms.UserControl)view.getCtrl("GestorProcesos.VentanaProcesos");
     VentanaProcesos_cstr      = view.getCtrlStruct("GestorProcesos.VentanaProcesos");
     tabProcesos               = (System.Windows.Forms.TabControl)view.getCtrl("tabProcesos");
     tabProcesos_cstr          = view.getCtrlStruct("tabProcesos");
     Pcontent                  = (System.Windows.Forms.TabPage)view.getCtrl("Pcontent");
     Pcontent_cstr             = view.getCtrlStruct("Pcontent");
     PProcessPanel             = (System.Windows.Forms.TabPage)view.getCtrl("PProcessPanel");
     PProcessPanel_cstr        = view.getCtrlStruct("PProcessPanel");
     PLeft                     = (System.Windows.Forms.Panel)view.getCtrl("PLeft");
     PLeft_cstr                = view.getCtrlStruct("PLeft");
     PProcessList              = (System.Windows.Forms.Panel)view.getCtrl("PProcessList");
     PProcessList_cstr         = view.getCtrlStruct("PProcessList");
     LProcess                  = (System.Windows.Forms.ListBox)view.getCtrl("LProcess");
     LProcess_cstr             = view.getCtrlStruct("LProcess");
     contextMenu_Proceso       = (System.Windows.Forms.ContextMenuStrip)view.getCtrl("contextMenu_Proceso");
     contextMenu_Proceso_cstr  = view.getCtrlStruct("contextMenu_Proceso");
     PProcessDir               = (System.Windows.Forms.Panel)view.getCtrl("PProcessDir");
     PProcessDir_cstr          = view.getCtrlStruct("PProcessDir");
     TV_Processes              = (System.Windows.Forms.TreeView)view.getCtrl("TV_Processes");
     TV_Processes_cstr         = view.getCtrlStruct("TV_Processes");
     contextMenu_Procesos      = (System.Windows.Forms.ContextMenuStrip)view.getCtrl("contextMenu_Procesos");
     contextMenu_Procesos_cstr = view.getCtrlStruct("contextMenu_Procesos");
 }
Exemple #2
0
        public void GetUnprocessedParam(System.Windows.Forms.UserControl control, out object value)
        {
            byte[] v;

            ProcessParam(control, out v);
            value = v;
        }
 static void ShowWaitForm(System.Windows.Forms.UserControl owner, string caption)
 {
     if (SplashScreenManager.Default == null)
     {
         SplashScreenManager.ShowDefaultWaitForm((owner != null) ? owner.FindForm() : null, false, false, caption);
     }
 }
        /// <summary>
        /// Get next visible tabstop control. Used for tab key handling.
        /// </summary>
        /// <param name="form">the form that contains those controls</param>
        /// <returns>a control; or null if not found</returns>
        public static System.Windows.Forms.Control GetNextTabStopControl(System.Windows.Forms.UserControl form)
        {
            System.Windows.Forms.Control ctrl = form.GetNextControl(form.ActiveControl, true);
            bool found = false, exhausted = false, marked = false;

            while (!found && !exhausted)
            {
                if (ctrl != null)
                {
                    if (ctrl.TabStop && ctrl.CanFocus)
                    {
                        found = true; break;
                    }                                                            // found a control
                    else
                    {
                        ctrl = form.GetNextControl(ctrl, true);
                    }
                }
                else
                {
                    if (marked)
                    {
                        exhausted = true; break;
                    }                                       // exhausted all the controls
                    else
                    {
                        ctrl   = form.GetNextControl(null, true);
                        marked = true;
                    }
                }
            }

            return(ctrl);
        }
        private void mainLoaded(object sender, RoutedEventArgs e)
        {
            Assembly gamAssembly = Assembly.LoadFrom(@"D:\Documents\GitHub\WPFDll_test\Wpfdongraijiazai\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.dll");
            Type     typeGame    = gamAssembly.GetType("WindowsFormsApplication2.UnityControl");

            System.Windows.Forms.UserControl rehabGame = Activator.CreateInstance(typeGame) as System.Windows.Forms.UserControl;
            host.Visibility = Visibility.Collapsed;  // Trick to avoid initialization exception
            host.Child      = rehabGame;
            host.Visibility = Visibility.Visible;
            System.Diagnostics.Debug.Print("Done");


            //host.Visibility = Visibility.Collapsed;
            //axUnityWebPlayer1 = new AxUnityWebPlayerAXLib.AxUnityWebPlayer();
            //host.Child = (this.axUnityWebPlayer1);
            //((System.ComponentModel.ISupportInitialize)(this.axUnityWebPlayer1)).EndInit();
            //axUnityWebPlayer1.src = src;
            //System.Windows.Forms.AxHost.State _state = axUnityWebPlayer1.OcxState;
            //axUnityWebPlayer1.Dispose();

            //axUnityWebPlayer1 = new AxUnityWebPlayerAXLib.AxUnityWebPlayer();
            //((System.ComponentModel.ISupportInitialize)(axUnityWebPlayer1)).BeginInit();
            ////this.SuspendLayout();
            //axUnityWebPlayer1.Dock = System.Windows.Forms.DockStyle.Fill;
            //axUnityWebPlayer1.Name = "Unity3D";
            //axUnityWebPlayer1.OcxState = _state;
            //axUnityWebPlayer1.Size = new System.Drawing.Size(691, 418);
            //axUnityWebPlayer1.TabIndex = 0;
            ////Controls.Add(axUnityWebPlayer1);
            //((System.ComponentModel.ISupportInitialize)(axUnityWebPlayer1)).EndInit();
            ////this.ResumeLayout(false);
            //this.axUnityWebPlayer1.OnExternalCall += new AxUnityWebPlayerAXLib._DUnityWebPlayerAXEvents_OnExternalCallEventHandler(this.axUnityWebPlayer1_OnExternalCall);
            //host.Visibility = Visibility.Visible;
            //System.Diagnostics.Debug.Print("Done");
        }
Exemple #6
0
 public static void LoadUserControl(System.Windows.Forms.UserControl obj, System.Windows.Forms.UserControl uc)
 {
     obj.Controls.Clear();
     uc.Left = (obj.Width - uc.Width) / 2;
     uc.Top  = (obj.Height - uc.Height) / 2 - 10;
     obj.Controls.Add(uc);
 }
Exemple #7
0
 public void SetParam(System.Windows.Forms.UserControl control, byte[] param)
 {
     // Make sure control is valid
     if (control is UI.byteArrayControl)
     {
         (control as UI.byteArrayControl).Value = _host.ActiveCommunicator.PlatformBitConverter.GetInverseEndianBitConverter().ToString(param).Replace("-", "");
     }
 }
Exemple #8
0
 public void SetParam(System.Windows.Forms.UserControl control, byte[] param)
 {
     // Make sure control is valid
     if (control is UI.stringControl)
     {
         (control as UI.stringControl).Value = Encoding.UTF8.GetString(param);
     }
 }
Exemple #9
0
 /// <summary>
 /// Add the given unmanaged window as modal parent
 /// </summary>
 /// <param name="parent">The unmanaged window</param>
 public void AddUnmanagedParent(System.Windows.Forms.UserControl parent)
 {
     if (_unmanagedParents == null)
     {
         _unmanagedParents = new List <System.Windows.Forms.UserControl>();
     }
     _unmanagedParents.Add(parent);
 }
Exemple #10
0
 /// <summary>
 /// Remove the unmanaged window as parent
 /// </summary>
 /// <param name="parent">The unmanaged window</param>
 public void RemoveUnmanagedParent(System.Windows.Forms.UserControl parent)
 {
     if (_unmanagedParents == null)
     {
         return;
     }
     _unmanagedParents.Remove(parent);
 }
Exemple #11
0
        public static PageData getPageData(System.Windows.Forms.UserControl PageControl, string PageName)
        {
            PageData x = new PageData();

            x.PageControl = PageControl;
            x.PageName    = PageName;
            return(x);
        }
Exemple #12
0
 public void SetParam(System.Windows.Forms.UserControl control, byte[] param)
 {
     // Make sure control is valid
     if (control is UI.byteControl)
     {
         (control as UI.byteControl).Value = param[0];
     }
 }
Exemple #13
0
 public void GetUnprocessedParam(System.Windows.Forms.UserControl control, out object value)
 {
     value = null;
     if (control != null && control is UI.shortControl)
     {
         value = (control as UI.shortControl).Value;
     }
 }
Exemple #14
0
 public void SetParam(System.Windows.Forms.UserControl control, byte[] param)
 {
     // Make sure control is valid
     if (control is UI.shortControl)
     {
         (control as UI.shortControl).Value = _host.ActiveCommunicator.PlatformBitConverter.ToInt16(param, 0);
     }
 }
Exemple #15
0
 static void ShowWaitForm(System.Windows.Forms.UserControl owner, string caption)
 {
     if (SplashScreenManager.Default == null)
     {
         SplashScreenManager.ShowForm(owner, typeof(DevExpress.XtraWaitForm.DemoWaitForm), false, false);
         SplashScreenManager.Default.SetWaitFormCaption(caption);
     }
 }
        public void GetUnprocessedParam(System.Windows.Forms.UserControl control, out object value)
        {
            byte[] v;

            ProcessParam(control, out v);
            value = new sbyte[v.Length];
            v.CopyTo((sbyte[])value, 0);
        }
Exemple #17
0
        public MainTabPage(System.Windows.Forms.UserControl userControl, string name)
        {
            Text = name;
            CloseButtonEnable = true;

            panel      = userControl;
            panel.Dock = System.Windows.Forms.DockStyle.Fill;
            Controls.Add(panel);
        }
Exemple #18
0
        static InitClass()
        {
            ;
            syncCtrl = new System.Windows.Forms.UserControl();

            syncCtrl.CreateControl();


            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
        }
        static PDNBulkUpdaterEffect()
        {
            try
            {
                if (System.Windows.Forms.Application.OpenForms.Count > 0)
                {
                    m_mainWindow = System.Windows.Forms.Application.OpenForms[System.Windows.Forms.Application.OpenForms.Count - 1];

                    while (m_mainWindow.Owner != null)
                    {
                        m_mainWindow = m_mainWindow.Owner;
                    }
                }

                foreach (System.Windows.Forms.Control ctrl in m_mainWindow.Controls)
                {
                    System.Windows.Forms.UserControl workSpace = ctrl as System.Windows.Forms.UserControl;

                    if (workSpace != null)
                    {
                        PropertyInfo info = workSpace.GetType().GetProperty("ToolBar");

                        if (info != null)
                        {
                            System.Windows.Forms.Control toolbar = info.GetGetMethod().Invoke(workSpace, new object[0]) as System.Windows.Forms.Control;

                            if (toolbar != null)
                            {
                                info = toolbar.GetType().GetProperty("MainMenu");

                                if (info != null)
                                {
                                    System.Windows.Forms.MenuStrip menu = info.GetGetMethod().Invoke(toolbar, new object[0]) as System.Windows.Forms.MenuStrip;

                                    if (menu != null)
                                    {
                                        // "Effects" drop down menu
                                        System.Windows.Forms.ToolStripMenuItem fileItem = menu.Items[6] as System.Windows.Forms.ToolStripMenuItem;
                                        //fileItem.DropDownOpening += new EventHandler(fileItem_DropDownOpening);
                                        fileItem_DropDownOpening(fileItem, null);
                                    }
                                }
                            }
                        }

                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                m_loaderException = ex;
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }
        }
        public MainWindow()
        {
            InitializeComponent();

            System.Windows.Forms.UserControl          userControl1       = new System.Windows.Forms.UserControl();
            DevExpress.DashboardWin.DashboardDesigner dashboardDesigner1 = new DevExpress.DashboardWin.DashboardDesigner();
            userControl1.Controls.Add(dashboardDesigner1);
            dashboardDesigner1.Dock = System.Windows.Forms.DockStyle.Fill;
            dashboardDesigner1.CreateRibbon();
            dashboardHost.Child = userControl1;
        }
Exemple #21
0
        public void OnCropRotationClick(object sender, EventArgs e)
        {
            //if (View.CurrentWorkspace.CurrentDefineView == null)
            //{
            //    var newDefineView = new ArableDefineFieldView.ArableDefineFieldView();
            //    View.CurrentWorkspace.CurrentDefineView = newDefineView;
            //}
            //ControlInjector.InjectIntoZone(View.CurrentWorkspace.CurrentDefineView, View.CurrentWorkspace.ArableMainZone);
            var ctrl = new System.Windows.Forms.UserControl();

            ControlInjector.InjectIntoZone(ctrl, View.CurrentWorkspace.ArableMainZone);
        }
Exemple #22
0
        static public Context CreateContext(System.Windows.Forms.UserControl UserControl, PIXELFORMATDESCRIPTOR PixelFormatDescriptor)
        {
            IntPtr HWND = UserControl.Handle;

            if (HWND.ToInt64() == 0)
            {
                throw new Exception("Invalid user control handle");
            }
            IntPtr HDC = GetDC(HWND);

            return(CreateContext(HDC, PixelFormatDescriptor));
        }
Exemple #23
0
        public bool ProcessParam(System.Windows.Forms.UserControl control, out byte[] param)
        {
            param = null;

            // Make sure control is of proper type
            if (!(control is UI.byteControl))
            {
                return(false);
            }

            param = new byte[] { (control as UI.byteControl).Value };
            return(true);
        }
Exemple #24
0
        public bool ProcessParam(System.Windows.Forms.UserControl control, out byte[] param)
        {
            param = null;

            // Make sure control is of proper type
            if (!(control is UI.byteArrayControl))
            {
                return(false);
            }

            param = (BitConverter.IsLittleEndian ? NetCheatX.Core.Bitlogic.EndianBitConverter.LittleEndianBitConverter : NetCheatX.Core.Bitlogic.EndianBitConverter.BigEndianBitConverter).GetBytes((control as UI.byteArrayControl).Value);
            return(true);
        }
Exemple #25
0
        public bool ProcessParam(System.Windows.Forms.UserControl control, out byte[] param)
        {
            param = null;

            // Make sure control is of proper type
            if (!(control is UI.shortControl))
            {
                return(false);
            }

            param = _host.ActiveCommunicator.PlatformBitConverter.GetBytes((control as UI.shortControl).Value);
            return(true);
        }
Exemple #26
0
        public static Microsoft.Office.Tools.CustomTaskPane AddTaskPane(System.Windows.Forms.UserControl taskPane, string name, CustomTaskPaneCollection customTaskPanes)
        {
            //PLLog.Trace3("Enter", Common.PROJECT_NAME);

            CustomTaskPane ctp = default(CustomTaskPane);

            ctp = customTaskPanes.Add(taskPane, name);
            ctp.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionRight;
            ctp.Visible      = true;

            //PLLog.Trace3("Exit", System.Data.Common.PROJECT_NAME);
            return(ctp);
        }
Exemple #27
0
 public void AddBodyByType(System.Windows.Forms.UserControl ctrl, Type type)
 {
     if (!this._CheckControl((System.Windows.Forms.Control)ctrl))
     {
         return;
     }
     if (this.CheckControlByType(type))
     {
         this._CleanNewControl(ctrl);
         return;
     }
     this._AddBody(ctrl);
     this.TogleHide();
 }
Exemple #28
0
 public Waybill_VM(int?id_object, int id_table)
 {
     this.id_object = id_object;
     waybill_rec    = new Waybill_M(id_object);
     // Для WinForms
     cntrl1                = new System.Windows.Forms.UserControl();
     elementHost1          = new System.Windows.Forms.Integration.ElementHost();
     elementHost1.Dock     = System.Windows.Forms.DockStyle.Fill;
     elementHost1.Location = new System.Drawing.Point(0, 0);
     elementHost1.Name     = "elementHost1";
     //elementHost1.Child = new Waybill_V() { DataContext = this };
     cntrl1.Controls.Add(elementHost1);
     cntrl1.Load += cntrl1_Load;
 }
        public DrawingUnit()
        {
            m_parent = null;
            m_upper_left = new Point(0,0);
            m_lower_right = new Point(0,0);
            m_text_line = "";
            m_color = Color.White;
            m_draw_color = m_color;
            m_is_flashing = false;
            m_flashing_speed = int.MaxValue;

            m_timer = new System.Windows.Forms.Timer();
            m_timer.Enabled = false;
            m_timer.Tick += new System.EventHandler(this.OnTimerTick);
        }
 public static System.Windows.Forms.DialogResult SafeShowMessageBox(System.Windows.Forms.UserControl form, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
 {
     if (form.InvokeRequired)
     {
         //important to show the notification on the main thread of BIDS
         return((System.Windows.Forms.DialogResult)form.Invoke(
                    new DialogResultDelegate2(SafeShowMessageBox), new object[] { form, text, caption, buttons, icon }
                    ));
     }
     else
     {
         System.Windows.Forms.IWin32Window owner = (System.Windows.Forms.IWin32Window)form;
         return(System.Windows.Forms.MessageBox.Show(owner, text, caption, buttons, icon));
     }
 }
Exemple #31
0
        public bool ProcessParam(System.Windows.Forms.UserControl control, out byte[] param)
        {
            param = null;

            // Make sure control is of proper type
            if (!(control is UI.stringControl))
            {
                return(false);
            }

            param = (control as UI.stringControl).UTF8 ?
                    Encoding.UTF8.GetBytes((control as UI.stringControl).Value) :
                    Encoding.ASCII.GetBytes((control as UI.stringControl).Value);
            return(true);
        }
        public DrawingUnit(System.Windows.Forms.UserControl parent,Point ul, Point lr, string text, Color color, bool isFlashing, uint flashing_speed)
        {
            m_parent = parent;
            m_upper_left = ul;
            m_lower_right = lr;
            m_text_line = text;
            m_color = color;
            m_draw_color = m_color;
            m_is_flashing = isFlashing;
            m_flashing_speed = flashing_speed;

            m_timer = new System.Windows.Forms.Timer();
            m_timer.Enabled = false;
            if (m_is_flashing)
            {
                m_timer.Interval = (int)m_flashing_speed;
            }
            else
            {
                m_timer.Interval = int.MaxValue;
            }
            m_timer.Tick += new System.EventHandler(this.OnTimerTick);
        }
        private void OpenAttachment(DataTable dt, string versionid, string matterid, string templateid, string versionName, string versionNumber)
        {
            try
            {
                this.Dispatcher.BeginInvoke(DispatcherPriority.Background,
             new Action(
                 delegate
                 {
                     var res = from row in dt.AsEnumerable()
                               where
                               (row.Field<string>("Name").Contains(".doc") ||
                               row.Field<string>("ContentType").Contains("msword"))
                               select row;
                     if (res.Count() > 1)
                     {

                         AttachmentsView attTemp = new AttachmentsView();
                         attTemp.Create(dt, versionid, matterid, templateid, versionName, versionNumber);
                         attTemp.Show();
                         attTemp.Focus();
                     }
                     else
                     {

                         string attachmentid;
                         foreach (DataRow rw in dt.Rows)
                         {
                             if (rw["Name"].ToString().Contains(".doc"))
                             {
                                 byte[] toBytes = Convert.FromBase64String(rw["body"].ToString());
                                 string filename = _d.GetTempFilePath(rw["Id"].ToString() + "_" + rw["Name"].ToString());

                                 File.WriteAllBytes(filename, toBytes);

                                 Word.Document doc = Globals.ThisAddIn.Application.Documents.Add(filename);

                                 attachmentid = rw["Id"].ToString();
                                 Globals.ThisAddIn.SaveAttachmentId(attachmentid);

                                 //Right Panel
                                 System.Windows.Forms.Integration.ElementHost elHost = new System.Windows.Forms.Integration.ElementHost();
                                 SForceEdit.CompareSideBar csb = new SForceEdit.CompareSideBar();
                                 csb.Create(filename, versionid, matterid, templateid, versionName, versionNumber, attachmentid);

                                 elHost.Child = csb;
                                 elHost.Dock = System.Windows.Forms.DockStyle.Fill;
                                 System.Windows.Forms.UserControl u = new System.Windows.Forms.UserControl();
                                 u.Controls.Add(elHost);
                                 Microsoft.Office.Tools.CustomTaskPane taskPaneValue = Globals.ThisAddIn.CustomTaskPanes.Add(u, "Axiom IRIS Compare", doc.ActiveWindow);
                                 taskPaneValue.Visible = true;
                                 taskPaneValue.Width = 400;

                             }
                         }
                     }
                 }));
            }
            catch (Exception ex)
            {

            }
        }
 public NotificationEventArgs(Framework.Interfaces.IPlugin plugin, System.Windows.Forms.UserControl _messageBox)
 {
     Plugin = plugin;
     MessageBox = _messageBox;
 }
Exemple #35
0
 public LoadingService(System.Windows.Forms.UserControl owner) {
     this.owner = owner;
 }