Inheritance: DockingElementOpenCollection
 /// <summary>
 /// Initialize a new instance of the DockPageSavingEventArgs class.
 /// </summary>
 /// <param name="manager">Reference to owning docking manager instance.</param>
 /// <param name="xmlWriter">Xml writer for persisting custom data.</param>
 /// <param name="page">Reference to page being saved.</param>
 public DockPageSavingEventArgs(KryptonDockingManager manager,
                                XmlWriter xmlWriter,
                                KryptonPage page)
     : base(manager, xmlWriter)
 {
     _page = page;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialize a new instance of the DockPageLoadingEventArgs class.
 /// </summary>
 /// <param name="manager">Reference to owning docking manager instance.</param>
 /// <param name="xmlReading">Xml reader for persisting custom data.</param>
 /// <param name="page">Reference to page being loaded.</param>
 public DockPageLoadingEventArgs(KryptonDockingManager manager,
                                 XmlReader xmlReading,
                                 KryptonPage page)
     : base(manager, xmlReading)
 {
     _page = page;
 }
 /// <summary>
 /// Initialize a new instance of the DragTargetNull class.
 /// </summary>
 /// <param name="manager">Reference to docking manager.</param>
 /// <param name="floatingWindow">Reference to window being dragged.</param>
 /// <param name="pages">Reference to collection of pages to drag.</param>
 public DockingDragTargetProvider(KryptonDockingManager manager, 
                                  KryptonFloatingWindow floatingWindow,
                                  KryptonPageCollection pages)
 {
     _manager = manager;
     _floatingWindow = floatingWindow;
     _pages = pages;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initialize a new instance of the DockingDragManager class.
        /// </summary>
        /// <param name="manager">Reference to manager creating this instance.</param>
        /// <param name="c">Control that is starting the drag operation.</param>
        public DockingDragManager(KryptonDockingManager manager, Control c)
        {
            _manager = manager;
            _offset = Point.Empty;

            // Use timer to ensure we do not update the display too quickly which then causes tearing
            _moveTimer = new Timer();
            _moveTimer.Interval = 10;
            _moveTimer.Tick += new EventHandler(OnFloatingWindowMove);
        }
 /// <summary>
 /// Initialize a new instance of the DockingManagerStrings class.
 /// </summary>
 /// <param name="docking">Reference to owning docking manager.</param>
 public DockingManagerStrings(KryptonDockingManager docking)
     : base()
 {
     // Default values
     _textAutoHide = _defaultTextAutoHide;
     _textClose = _defaultTextClose;
     _textCloseAllButThis = _defaultTextCloseAllButThis;
     _textDock = _defaultTextDock;
     _textFloat = _defaultTextFloat;
     _textHide = _defaultTextHide;
     _textTabbedDocument = _defaultTextTabbedDocument;
     _textWindowLocation = _defaultTextWindowLocation;
 }
 /// <summary>
 /// Initialize a new instance of the DockGlobalSavingEventArgs class.
 /// </summary>
 /// <param name="manager">Reference to owning docking manager instance.</param>
 /// <param name="xmlWriter">Xml writer for persisting custom data.</param>
 public DockGlobalSavingEventArgs(KryptonDockingManager manager,
                                  XmlWriter xmlWriter)
 {
     _manager = manager;
     _xmlWriter = xmlWriter;
 }
 /// <summary>
 /// Initialize a new instance of the DockGlobalLoadingEventArgs class.
 /// </summary>
 /// <param name="manager">Reference to owning docking manager instance.</param>
 /// <param name="xmlReading">Xml reader for persisting custom data.</param>
 public DockGlobalLoadingEventArgs(KryptonDockingManager manager,
                                   XmlReader xmlReading)
 {
     _manager = manager;
     _xmlReader = xmlReading;
 }
        /// <summary>
        /// Initialize a new instance of the DockingManagerStringsBase class.
        /// </summary>
        /// <param name="docking">Reference to owning docking manager.</param>
        public DockingManagerStringsBase(KryptonDockingManager docking)
        {
            // Define the encryted licence information
            EncryptedLicenseProvider.SetParameters(_licenseParameters);

            // If an error has already been shown, then no need to test license again
            bool validated = _usageShown;
            if (!validated)
            {
                // Is there a valid license registered?
                License license = null;
                validated = LicenseManager.IsValid(typeof(KryptonDockingManager), this, out license);

                // Valid license is not enough!
                if (validated)
                {
                    validated = false;
                    EncryptedLicense encryptedLicense = license as EncryptedLicense;
                    string[] productInfo = encryptedLicense.ProductInfo.Split(',');

                    // Must contain two fields separated by a comma
                    if (productInfo.Length == 2)
                    {
                        // Both fields must not be empty
                        if (!string.IsNullOrEmpty(productInfo[0]) &&
                            !string.IsNullOrEmpty(productInfo[1]))
                        {
                            // Product code must be ...
                            //    'S' = Krypton Suite
                            // And version number...
                            //    '400'
                            validated = (productInfo[1].Equals("400")) && (productInfo[0][0] == 'S');
                        }
                    }
                }

                // Remember to release resources no longer needed
                if (license != null)
                    license.Dispose();
            }

            // If we need to indicate the invalid licensing state...
            if (!validated)
            {
                // Get hold of the assembly version number
                Version thisVersion = Assembly.GetExecutingAssembly().GetName().Version;

                // We want a unique 30 day evaluation period for each major/minor version
                EvaluationMonitor monitor = new EvaluationMonitor(_monitorId + thisVersion.Major.ToString() + thisVersion.Minor.ToString());

                // If the first time we have failed to get the licence or
                // the 30 days evaluation period has expired or the component
                // has been created over a 3000 times then...
                if ((monitor.UsageCount == 0) ||
                    (monitor.UsageCount > 3000) ||
                    (monitor.DaysInUse > 30))
                {
                    // At runtime show a NAG screen to prevent unauthorized use of the control
                    if (LicenseManager.CurrentContext.UsageMode == LicenseUsageMode.Runtime)
                    {
                        MessageBox.Show("This application was created using an unlicensed version of\n" +
                                        "the Krypton Suite control from Component Factory Pty Ltd.\n\n" +
                                        "You must contact your software supplier in order to resolve\n" +
                                        "the licencing issue.",
                                        "Unlicensed Application",
                                        MessageBoxButtons.OK,
                                        MessageBoxIcon.Error);
                    }
                    else
                    {
                        LicenseInstallForm form = new LicenseInstallForm();
                        form.ShowDialog(typeof(KryptonDockingManager));
                    }
                }
            }

            // No need to perform check check more than once
            _usageShown = true;
        }
 /// <summary>
 /// Initialize a new instance of the DockingManagerStringsBase class.
 /// </summary>
 /// <param name="docking">Reference to owning docking manager.</param>
 public DockingManagerStringsBase(KryptonDockingManager docking)
 {
 }