public MasterController(GraphicsDeviceManager a_manager, ContentManager a_contentManager, GraphicsDevice a_graphics) { m_view = new View.View(a_manager, a_contentManager, a_graphics); m_menu = new View.Menu(a_manager, a_contentManager, m_view); m_gameController = new GameController(m_view, m_camera, m_menu, m_manager, a_contentManager); m_manager = a_manager; }
public Board() { _gameFinished = false; _pause = false; _snake = new Snake(PointFactory.Create(10, 10)); _view = new View.View(); }
public bool OnItemLongClick(AdapterView <object> adapterView, View.View view, int position, long id) { var args = new ItemClickEventArgs(view, position, id); Invoke(adapterView, args); return(args.IsHandled); }
public bool OnGroupClick(ExpandableListView parent, View.View v, int groupPosition, long id) { var args = new GroupClickEventArgs(v, groupPosition, id); GroupClick.Invoke(parent, args); return(args.IsHandled); }
public ChildClickEventArgs(View.View view, int groupPosition, int childPosition, long id) { Id = id; ChildPosition = childPosition; GroupPosition = groupPosition; View = view; }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; ResourceBinding resourceBinding = new ResourceBinding(parentPanel, view); viewBinding.Add(resource, resourceBinding); resourceBinding.View.Document = Host.XMLRead <Document.Document>(Host.GetFileInfo(resource).FullName); if (resourceBinding.View.Document is Document.Document) { if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } } else { Host.Log("Problem while loading " + resource.DisplayName); } view.RefreshUI(); view.RefreshTitle(); view.IsReady = true; }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); try { view.PictureBox.Image = Image.FromFile(Host.GetFileInfo(resource).FullName, true); view.PictureWidth.Text = "" + view.PictureBox.Image.Width + " Pixel(s)"; view.PictureHeight.Text = "" + view.PictureBox.Image.Height + " Pixel(s)"; view.PictureDepth.Text = "" + view.PictureBox.Image.PixelFormat.ToString(); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } } catch (System.IO.FileNotFoundException) { Host.Log("Problem while loading " + resource.DisplayName); } view.RefreshTitle(); view.IsReady = true; }
public void SetLine(PhactoryHost.Database.Resource resource, int line) { if (viewBinding.ContainsKey(resource)) { View.View view = viewBinding[resource].View; view.SetLine(line); } }
public MasterController(GraphicsDeviceManager a_manager, ContentManager a_contentManager) { m_model = new Model.Model(); m_view = new View.View(a_manager, a_contentManager); m_menu = new View.Menu(a_manager, a_contentManager); m_pause = new View.Menu(a_manager, a_contentManager); m_death = new View.Menu(a_manager, a_contentManager); }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); bool highLight = false; string language = ""; switch (Host.GetFileInfo(resource).Extension.ToLower()) { case ".s": case ".asm": case ".c": case ".h": case ".cxx": case ".cpp": highLight = true; break; default: highLight = false; break; } if (language.Length != 0) { //view.textEditorControl.ConfigurationManager.Language = language; } if (highLight) { HighlightingManager.Manager.AddSyntaxModeFileProvider(new FileSyntaxModeProvider(Application.StartupPath)); view.textEditorControl.Document.HighlightingStrategy = HighlightingManager.Manager.FindHighlighter("c_z80"); } FileInfo fileInfo = Host.GetFileInfo(resource); string fileContent = File.ReadAllText(fileInfo.FullName);; view.textEditorControl.Text = fileContent; if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } view.IsReady = true; if (resource.IsOutputResource) { view.SetReadOnly(true); } view.RefreshTitle(); }
public GameController(View.View a_view, View.Camera a_camera, View.Menu a_menu, GraphicsDeviceManager a_manager, ContentManager a_contentManager) { m_enemyBolt = new Model.EnemyBolt(); m_view = a_view; m_menu = a_menu; m_camera = a_camera; m_manager = a_manager; m_model = new Model.Model(m_player, m_statehandler, m_levels, m_enemy, m_enemyBolt); // m_sound = new Model.SoundManager(a_contentManager); m_save = new Model.Save(m_player, m_statehandler, m_levels, m_model); }
public void OnResourceChanged(PhactoryHost.Database.Resource resource) { View.View view = viewBinding[resource].View; FileInfo fileInfo = Host.GetFileInfo(resource); string fileContent = File.ReadAllText(fileInfo.FullName); view.RefreshContent(); Host.Log(resource.DisplayName + " refreshed"); }
public Playmode(gameState s, KTYD.Model.Map g, Boolean p, KeyboardState i, bool[] ps, float st, float[] t, Controller.Players gPlayers, Dictionary<PlayerIndex, int> test, View.View gView) : base(s) { c = test; gamePlayers = gPlayers; gameMap = g; pauseGame = p; input = i; pressShoot = ps; storeTime = st; time = t; gameView = gView; }
public bool IsResourceModified(PhactoryHost.Database.Resource resource) { View.View view = null; try { view = viewBinding[resource].View; } catch (KeyNotFoundException) { return(false); } return(view.IsModified()); }
public bool IsResourceOpened(PhactoryHost.Database.Resource resource) { try { View.View view = viewBinding[resource].View; if (view != null) { return(true); } } catch { } return(false); }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); view.RefreshContent(); view.RefreshTitle(); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } view.IsReady = true; }
private static void Main(string[] args) { IView view = new View.View(); var controler = new Controler(view); controler.Start(); while (controler.Alive) { try { Thread.Sleep(10); Application.DoEvents(); } catch { MessageBox.Show("DoEvents errror"); } } }
private static void Main(string[] args) { IView view = new View.View(); var controler = new Controler(view); controler.Start(); while (controler.Alive) { try { Thread.Sleep(10); Application.DoEvents(); } catch { MessageBox.Show("DoEvents errror"); } } }
protected IViewable View([CallerMemberName] string caller = "") { this.InitializeViewModelData(); string controllerName = this.GetType() .Name .Replace(MvcContext.Get.ControllersSuffix, string.Empty); string fullQualifiedNAme = string.Format( "{0}.{1}.{2}.{3}, {0}", MvcContext.Get.AssemblyName, MvcContext.Get.ViewsFolder, controllerName, caller); IRenderable view = new View.View(fullQualifiedNAme, this.Model.Data); return(new ViewResult(view)); }
public void SaveResource(PhactoryHost.Database.Resource resource) { if (viewBinding.ContainsKey(resource)) { View.View view = viewBinding[resource].View; IgnoreNextResource = resource; FileInfo fileInfo = Host.GetFileInfo(resource); view.WriteContentToFile(fileInfo.FullName); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " written"); } Host.RefreshOutput(resource); view.SetModified(false); } }
static void Main(string[] args) { View.View view = new View.View(); view.PrintApplicationInfo(); view.PrintApplicationOptions(); var applicationModeView = view.PrintSelectApplicationMode(); if (applicationModeView == ApplicationModeView.Client) { view.PrintInformationAboutClientMode(); } if (applicationModeView == ApplicationModeView.Server) { view.PrintInformationAboutServerMode(); } IApplicationControllerFactory applicationControllerFactory = new ApplicationControllerFactory(); IApplicationController applicationController = applicationControllerFactory.Create(applicationModeView); applicationController.Run(); }
/// <summary> /// Default ctor /// </summary> public ItemClickEventArgs(View.View view, int position, long id) { Id = id; Position = position; View = view; }
public MovedToScrapHeapEventArgs(View.View view) { View = view; }
public ClientController() { _view = new View.View(); }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); bool highLight = false; string language = ""; switch (Host.GetFileInfo(resource).Extension.ToLower()) { case ".s": case ".asm": case ".c": case ".h": case ".cxx": case ".cpp": highLight = true; break; default: highLight = false; break; } if (language.Length != 0) { //view.textEditorControl.ConfigurationManager.Language = language; } if (highLight) { HighlightingManager.Manager.AddSyntaxModeFileProvider(new FileSyntaxModeProvider(Application.StartupPath)); view.textEditorControl.Document.HighlightingStrategy = HighlightingManager.Manager.FindHighlighter("c_z80"); } FileInfo fileInfo = Host.GetFileInfo(resource); string fileContent = File.ReadAllText(fileInfo.FullName); ; view.textEditorControl.Text = fileContent; if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } view.IsReady = true; if (resource.IsOutputResource) { view.SetReadOnly(true); } view.RefreshTitle(); }
public bool IsResourceModified(PhactoryHost.Database.Resource resource) { View.View view = viewBinding[resource].View; return(view.IsModified()); }
public GroupClickEventArgs(View.View view, int groupPosition, long id) { Id = id; GroupPosition = groupPosition; View = view; }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); try { view.PictureBox.Image = Image.FromFile(Host.GetFileInfo(resource).FullName, true); view.PictureWidth.Text = "" + view.PictureBox.Image.Width + " Pixel(s)"; view.PictureHeight.Text = "" + view.PictureBox.Image.Height + " Pixel(s)"; view.PictureDepth.Text = "" + view.PictureBox.Image.PixelFormat.ToString(); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } } catch (System.IO.FileNotFoundException) { Host.Log("Problem while loading " + resource.DisplayName); } view.RefreshTitle(); view.IsReady = true; }
public Controller(View.View view) { this.View = view; }
public QueryModel GetQueryModel(View.View view) { QueryModel result = new QueryModel(); result.Table = new Soway.Query.Entity.IQueryTable() { DBName = view.Model.DataTableName, ShowName = view.Model.Name }; result.Columns = new List <ModelQueryCol>(); foreach (var viewItem in view.Items.Where(p => p.Property.IsArray == false)) { var property = viewItem.Property; if (property.IsMultiMap == false) { ModelQueryCol col = new ModelQueryCol(); // col.Property = property; col.ShowName = viewItem.Name; col.IsKey = property.IsCheck; col.DBName = property.DBName; col.FormatStr = property.Format; col.IsIdentity = (property.IsCheck && string.IsNullOrEmpty(property.IXGroup)); col.Table = result.Table; col.DataType = property.PropertyType; col.ID = property.Name; col.ModelId = (property.Model == null ? 0 : property.Model.ID).ToString(); if (property.PropertyType == PropertyType.Enum && property.Model != null) { col.States = property.Model.EnumValues; } result.Columns.Add(col); if (cols.ContainsKey(col) == false) { cols.Add(col, property); } } else { foreach (var dbmap in property.DBMaps) { ModelQueryCol col = new ModelQueryCol(); col.ShowName = viewItem.Name + "_" + property.Model.Properties.FirstOrDefault(p => p.PropertyName == dbmap.PropertyName).Name; col.IsKey = false;// property.IsCheck; col.DBName = dbmap.DBColName; col.FormatStr = property.Format; col.IsIdentity = false; col.Table = result.Table; var mapProperty = property.Model.Properties.FirstOrDefault(p => p.Name == dbmap.PropertyName || p.PropertyName == dbmap.PropertyName); col.DataType = property.PropertyType; result.Columns.Add(col); if (cols.ContainsKey(col) == false) { cols.Add(col, property); } } } } if (view.Model.AutoSysId == true)// || Model.IdProperty == null) { ModelQueryCol col = new ModelQueryCol(); col.ShowName = "自动ID"; col.IsKey = true;// property.IsCheck; col.DBName = "SysId"; col.IsIdentity = true;// (property.IsCheck && string.IsNullOrEmpty(property.IXGroup)); col.Table = result.Table; // var mapProperty = property.Model.Properties.FirstOrDefault(p => p.Name == dbmap.PropertyName); //col.Property = null; col.DataType = PropertyType.IdentifyId; if (cols.ContainsKey(col) == false) { cols.Add(col, null); } result.Columns.Add(col); } return(result); }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; ResourceBinding resourceBinding = new ResourceBinding(parentPanel, view); viewBinding.Add(resource, resourceBinding); resourceBinding.View.Document = Host.XMLRead<Document.Document>(Host.GetFileInfo(resource).FullName); if (resourceBinding.View.Document is Document.Document) { if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } } else { Host.Log("Problem while loading " + resource.DisplayName); } view.RefreshUI(); view.RefreshTitle(); view.IsReady = true; }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); view.RefreshContent(); view.RefreshTitle(); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } view.IsReady = true; }
public QueryFactory(SqlCon con, Context.ICurrentContextFactory conFac) { this.Con = con; this.ConFac = conFac; relationView = new View.AutoViewFactory(this.Con, this.ConFac).CreateDefaultListView(relatoinModel); }
/// <summary> /// Invoke /// </summary> public void OnItemClick(AdapterView <object> adapterView, View.View view, int position, long id) { Invoke(adapterView, new ItemClickEventArgs(view, position, id)); }
public ResourceBinding(Panel panel, View.View view) { this.Panel = panel; this.View = view; }
public ResourceBinding(Panel panel, View.View view) { this.Panel = panel; this.View = view; }
public void RefreshViewTitle(PhactoryHost.Database.Resource resource) { View.View view = viewBinding[resource].View; view.RefreshTitle(); }
public ServerController() { _view = new View.View(); }
public void OnItemSelected(AdapterView <object> adapterView, View.View view, int position, long id) { ItemSelected.Invoke(adapterView, new ItemSelectedEventArgs(view, position, id)); }
public void OnMovedToScrapHeap(View.View view) { MovedToScrapHeap.Invoke(null, new MovedToScrapHeapEventArgs(view)); }