Exemplo n.º 1
0
        private static void RestoreCapabilitySavedPosition(object conference, CapabilityEventArgs cea)
        {
            // Do Window Positioning here
            ICapabilityWindow cww = null;

            if (cea.Capability is ICapabilityWindow)
            {
                cww = (ICapabilityWindow)cea.Capability;
            }
            else
            {
                return;
            }
            // Load the form location settings from the registry
            if (settings.GetValue("Top") != null)
            {
                cww.Top = Convert.ToInt32(settings.GetValue("Top"), CultureInfo.InvariantCulture);
            }
            if (settings.GetValue("Left") != null)
            {
                cww.Left = Convert.ToInt32(settings.GetValue("Left"), CultureInfo.InvariantCulture);
            }
            if (settings.GetValue("Width") != null)
            {
                cww.Width = Convert.ToInt32(settings.GetValue("Width"), CultureInfo.InvariantCulture);
            }

            if (settings.GetValue("Height") != null)
            {
                cww.Height = Convert.ToInt32(settings.GetValue("Height"), CultureInfo.InvariantCulture);
            }
        }
Exemplo n.º 2
0
 private static void SaveCapabilityPosition(ICapabilityWindow cww)
 {
     settings.SetValue("Top", cww.Top);
     settings.SetValue("Left", cww.Left);
     settings.SetValue("Width", cww.Width);
     settings.SetValue("Height", cww.Height);
 }
Exemplo n.º 3
0
        private static void autoSizeCapabilityWindow(ICapabilityWindow iCW)
        {
            if (autoPosition == AutoPositionMode.Tiled2x)
            {
                iCW.Height *= 2;
                iCW.Width *= 2;
            }

            if (autoPosition == AutoPositionMode.FourWay)
            {
                iCW.Size = new System.Drawing.Size(SystemInformation.WorkingArea.Width/2, SystemInformation.WorkingArea.Height/2);
            }

            if (autoPosition == AutoPositionMode.FullScreen)
            {
                iCW.Height = SystemInformation.WorkingArea.Height;
                iCW.Width = SystemInformation.WorkingArea.Width;
                iCW.Left = SystemInformation.WorkingArea.Left;
                iCW.Top = SystemInformation.WorkingArea.Top;
                return;
            }
        }
Exemplo n.º 4
0
 private static void SaveCapabilityPosition(ICapabilityWindow cww)
 {
     settings.SetValue("Top", cww.Top);
     settings.SetValue("Left", cww.Left);
     settings.SetValue("Width", cww.Width);
     settings.SetValue("Height", cww.Height);
 }