public ServerController(ISoftwareController p_SoftwareController, AbstractViewFactory p_Factory, string p_MachineName, string p_ServerID) { m_SoftwareController = p_SoftwareController; m_ServerModel = new ServerModel(); m_ServerView = p_Factory.CreateServerView(this, p_ServerID); m_ServerModel.ModelChanged += new ModelChangeEventHandler(m_ServerView.ServerModelChange); m_MachineName = p_MachineName; m_ServerID = p_ServerID; string[] ID_Spilts = p_ServerID.Split(new char[] { '.' }); if (ID_Spilts[0] == "Veriteq") { VeriteqOPCServer = true; System.Console.WriteLine("Connect to a Veriteq Server\n"); } m_DescriptionDictionary = new Dictionary <string, string>(); m_UnitDictionary = new Dictionary <string, string>(); m_ItemAccessMutex = new Mutex(); m_Server = null; m_Group = null; }
public ServerController(ISoftwareController softwareController, AbstractViewFactory factory, string machineName, string serverId) { _softwareController = softwareController; _serverView = factory.CreateServerView(this, serverId); if (_serverView is ServerTabUserControl serverTabUserControl) { serverTabUserControl.OnUpdateRate += (sender, args) => { Console.WriteLine(@"The new update rage is {0} millisecond", args.StateUpdateRate); _group.UpdateRate = args.StateUpdateRate; } } ; _serverModel = new ServerModel(); _serverModel.ModelChanged += _serverView.ServerModelChange; _machineName = machineName; _serverId = serverId; _itemAccessMutex = new Mutex(); _server = null; _group = null; }
public override ISoftwareView CreateSoftwareView(ISoftwareController p_SoftwareController) { return(new SoftwareFrame(p_SoftwareController)); }
public abstract ISoftwareView CreateSoftwareView(ISoftwareController p_SoftwareController);
public SoftwareFrame(ISoftwareController softwareController) { InitializeComponent(); _softwareController = softwareController; }