本文整理汇总了C#中IManager类的典型用法代码示例。如果您正苦于以下问题:C# IManager类的具体用法?C# IManager怎么用?C# IManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IManager类属于命名空间,在下文中一共展示了IManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CategoryViewModel
public CategoryViewModel(IManager manager)
{
this.manager = manager;
this.category = new Category();
this.SaveCommand = new RelayCommand(o => UpdateCategory());
ConfigureValidation();
}
示例2: Item
public Item(Item item)
{
ID = item.ID;
Name = item.Name;
Health = item.Health;
Armour = item.Armour;
Speed = item.Speed;
RotationSpeed = item.RotationSpeed;
Prefab = item.Prefab;
Cost = item.Cost;
BuildTime = item.BuildTime;
TypeIdentifier = item.TypeIdentifier;
TeamIdentifier = item.TeamIdentifier;
PlayerIdentifier = item.PlayerIdentifier;
BuildingIdentifier = item.BuildingIdentifier;
m_ItemImage = item.ItemImage;
m_Button = item.Button;
ItemImageHover = item.ItemImageHover;
SortOrder = item.SortOrder;
RequiredBuildings = item.RequiredBuildings;
Explosion = item.Explosion;
m_Manager = ManagerResolver.Resolve<IManager>();
m_CostPerSecond = ((float)Cost)/BuildTime;
m_ButtonStyle = item.ButtonStyle;
ObjectType = item.ObjectType;
}
示例3: FindReplaceDialog
public FindReplaceDialog(IManager manager)
{
InitializeComponent();
mManager = manager;
DialogMode = Mode.Find;
TextPlugin plugin = (TextPlugin)mManager.GetPlugin(typeof(TextPlugin));
plugin.FindReplaceDialog = this;
LoadFromRegistry(comboBoxFindWhat);
LoadFromRegistry(comboBoxReplaceWith);
LoadFromRegistry(comboBoxSearchIn);
LoadFromRegistry(comboBoxFileTypes);
if (comboBoxSearchIn.Items.Count == 0)
comboBoxSearchIn.Items.AddRange(new string[] { "Current Project", "All Open Documents" });
comboBoxSearchIn.Text = (string) comboBoxSearchIn.Items[0];
if (comboBoxFileTypes.Items.Count > 0)
comboBoxFileTypes.Text = (string) comboBoxFileTypes.Items[0];
else
FileTypes = "*.*";
checkBoxIncludeSubFolders.Checked = true;
}
示例4: SearchManager
public SearchManager(IManager pParentManager)
: base(pParentManager)
{
_searchService = new GoodMangaSearchService();
_searchService.Subscribe(this);
SearchEngine.Instance.Register(_searchService);
}
示例5: Add
public void Add(IManager manager)
{
manager.Register(_gameManager);
_managers.Add(manager);
_managers.Sort();
}
示例6: MainWindow
public MainWindow(IManager pManager)
: base(pManager)
{
InitializeComponent();
var mainManager = new MainManager(GetManager());
TabControl.Items.Add(new GoodMangaTabController(mainManager));
}
示例7: CategoriesViewModel
public CategoriesViewModel(IManager manager)
{
this.manager = manager;
Categories = new List<CategoryViewModel>();
currentCategory = new CategoryViewModel(new Category(), manager);
currentCategory.NotifyUpdate += () => LoadCategories();
}
示例8: ProjectPanel
public ProjectPanel(IManager manager)
{
InitializeComponent();
m_manager = manager;
m_mainWindow = (MainWindow) manager.MainWindow;
m_manager.PropertyChange += new PropertyChangeEventHandler(Manager_PropertyChange);
manager.ProjectOpened += new ProjectOpenedEventHandler(Manager_ProjectOpened);
m_systemImageList = new SystemImageList();
m_systemImageList.SetImageList(projectView);
m_italicFont = new Font(projectView.Font, FontStyle.Italic);
m_boldFont = new Font(projectView.Font, FontStyle.Bold);
UpdateTree();
foreach (Type docType in m_manager.GetPluginImplementations(typeof(Document)))
{
DocumentClassAttribute docAttr = DocumentClassAttribute.ForType(docType);
if(docAttr != null)
{
ToolStripMenuItem item = new ToolStripMenuItem();
item.Text = "New " + docAttr.Name;
item.Click += new EventHandler(AddNewDocument_Click);
item.Tag = docType;
addToolStripMenuItem.DropDownItems.Insert(0, item);
}
}
}
示例9: LocationViewModel
public LocationViewModel(IManager manager)
{
this.manager = manager;
this.location = new Location();
SaveCommand = new RelayCommand(o => UpdateLocation());
ConfigureValidation();
}
示例10: ExecuteToChildren
public static IEnumerable<IActionResult> ExecuteToChildren(
IManager pManager,
IAction pAction,
bool pCheckSource)
{
ArgumentsValidation.NotNull(pManager, "pManager");
ArgumentsValidation.NotNull(pAction, "pAction");
var result = new List<IActionResult>();
var children = pManager.GetChildren();
if (children != null)
{
var checkedChildren = children.Where(x => !pCheckSource || !ReferenceEquals(x, pAction.GetSource()));
foreach (var child in checkedChildren)
{
var r = child.Execute(pManager, pAction);
if (r == null || r is NotAvailableActionResult)
{
continue;
}
result.Add(r);
}
}
return new ReadOnlyCollection<IActionResult>(result);
}
示例11: PerformanceViewModel
public PerformanceViewModel(VenueViewModel venueVm, ArtistViewModel artistVm, DateTime day, IManager manager)
{
this.manager = manager;
this.performance = new Performance();
this.performance.Start = day;
var artist = manager.GetArtistByName(artistVm.Name);
if (artist != null && artist.Count > 0)
this.performance.Artist = artist.ElementAt(0);
else
this.performance.Artist = new Artist();
var venue = manager.GetVenueById(venueVm.Id);
if (venue != null)
this.performance.Venue = venue;
this.venueVm = venueVm;
this.artistVm = artistVm;
this.day = day;
this.artists = new List<ArtistViewModel>();
this.venues = new List<VenueViewModel>();
SaveCommand = new RelayCommand(o => manager.UpdatePerformance(performance));
RemoveCommand = new RelayCommand(o => manager.RemovePerformance(performance));
}
示例12: VenuesViewModel
public VenuesViewModel(IManager manager)
{
this.manager = manager;
Venues = new List<VenueViewModel>();
CurrentVenue = new VenueViewModel(new Venue(), manager);
CurrentVenue.NotifyUpdate += () => LoadVenues();
}
示例13: Start
void Start()
{
iManager = GameObject.FindGameObjectWithTag ( "IManager" ).GetComponent<IManager>();
if(Environment.OSVersion.ToString().Substring (0, 4) == "Unix")
{
path = mac;
} else
{
path = windows;
}
logPath = path + "Transaction Log.txt";
if ( File.Exists ( logPath ))
{
iManager.transactionHistory = new List<String> ( File.ReadAllText( logPath ).Split( new string[] { "\r\n", "\n" }, StringSplitOptions.None ));
iManager.ReadLog ();
} else {
UnityEngine.Debug.Log ( "No log file could be found." );
}
}
示例14: Server
static Server()
{
RemotingConfiguration.Configure(_configFile, false);
WellKnownClientTypeEntry[] entries = RemotingConfiguration.GetRegisteredWellKnownClientTypes();
Console.WriteLine(entries[0].TypeName + " " + entries[0].ObjectType + " " + entries[0].ObjectUrl);
_manager = (IManager)Activator.GetObject(entries[0].ObjectType, entries[0].ObjectUrl);
}
示例15: LocationsViewModel
public LocationsViewModel(IManager manager)
{
this.manager = manager;
Locations = new List<LocationViewModel>();
CurrentLocation = new LocationViewModel(new Location(), manager);
CurrentLocation.NotifyUpdate += () => LoadLocations();
}