/// <summary>
        /// Create an alpha blended form with a transparent background that is movable and responds to mouse and key inputs.
        /// </summary>
        public DockItemObject(MainForm TheParent, LanguageLoader.LanguageLoader LanguageData, SettingsLoader.SettingsLoader SettingsData,
                              DockItemSettingsLoader.DockItemSettingsLoader DockItemData, String SectionName, Size InitialSize, String Path)
        {
            Language            = LanguageData;
            DockSettings        = SettingsData;
            ParentObject        = TheParent;
            DockItemSettings    = DockItemData;
            DockItemSectionName = SectionName;
            ObjectSize          = InitialSize;

            if (DockItemSectionName != null && DockItemSectionName != "")
            {
                FileOperations = new FileOps.FileOps(@DockItemSettings.GetEntry(DockItemSectionName, "Args"));
            }
            else
            {
                FileOperations = new FileOps.FileOps(@Path);
            }

            InitializeComponent();

            TopMost       = true;
            ShowInTaskbar = false;
            AllowDrop     = true;

            LeftMouseButtonDown          = false;
            ThisObjectMovedWithLeftMouse = false;

            ObjectBitmap    = new Bitmap(1, 1, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            OverlayBitmap   = new Bitmap(1, 1, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            ObjectOpacity   = 255;
            PreviousOpacity = ObjectOpacity;

            SetBitmap();
        }
Example #2
0
        public MainForm()
        {
            DockSettings     = new SettingsLoader.SettingsLoader(Application.StartupPath + "\\System\\Settings\\Config.ini");
            LanguageWords    = new LanguageLoader.LanguageLoader(Application.StartupPath + DockSettings.Language.path);
            DockItemSettings = new DockItemSettingsLoader.DockItemSettingsLoader(Application.StartupPath + "\\System\\Settings\\DockItemData.ini");

            InitializeComponent();
            MainDockObjects = new ArrayList();

            InitializeBackgroundObject();
            InitializeMouseHook();
            InitializeCentreObject();
            ShowLevel(ROOT_LEVEL);
        }