Exemplo n.º 1
0
        public static void Init(String version, String optionsFilename,
                                ILogManager defaultLog, IShutdown shutdown,
                                ICallbackManager callbacks,
                                IServerManager servers,
                                MeasureStringControl measure,
                                String defaultRegistryLoc)
        {
            _versionString = version;

            _defaultLogManager = defaultLog;
            _shutdownMethod    = shutdown;
            _callbackManager   = callbacks;
            _serverManager     = servers;
            _measureControl    = measure;

            _applianceFrameMap = new Hashtable();

            _store = new PUC.PersistentData.DataStore(optionsFilename);

            if (!_store.IsKeyValid(Globals.REGISTRY_FILE_ATTR))
            {
                _store.Set(Globals.REGISTRY_FILE_ATTR, defaultRegistryLoc);
                _store.Set(Globals.RECENT_SERVER_ATTR, 10);
                _store.Set(Globals.RECENT_COUNT_ATTR, 0);
            }
        }
Exemplo n.º 2
0
        public PUCFrame()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            Debug.Assert(DEFAULT_FRAME == null, "PUCFrame should only be instantiated once.");
            PUCFrame.DEFAULT_FRAME = this;

            _measureCtl = new MeasureStringControl();
            this.Controls.Add(_measureCtl);
            _measureCtl.Location = new Point(0, 0);
            _measureCtl.Size     = new Size(0, 0);

            Globals.Init(VERSION_STRING, "\\Program Files\\PUC\\pucdata.xml", this, this, this, this, _measureCtl, "\\Program Files\\PUC\\pocketpc.xml");

            _uiEventQueue = new Queue();

            _appliances = new ArrayList();
            _servers    = new ArrayList();

            this.Text = Globals.GetVersionString();
            AddLogLine(Globals.GetVersionString() + " Starting...");

            this.logPanel.Size = this.ClientSize;
            this.logBox.Size   = new System.Drawing.Size(this.logPanel.Size.Width,
                                                         this.logPanel.Size.Height -
                                                         this.logBox.Location.Y);

            _connectDialog = new ConnectServerDlg(this);
            _optionsDialog = new OptionsDialog();

            _inputPanel = new InputPanel();
            _inputPanel.EnabledChanged += new EventHandler(_inputPanel_EnabledChanged);

            SetupRecentList();

            SetupRulePhases();

            _registry = WidgetRegistryParser.Parse(Globals.GetWidgetRegistryFileName());

            SetupSmartCIOManager();
        }