本文整理汇总了C#中IWindowManager类的典型用法代码示例。如果您正苦于以下问题:C# IWindowManager类的具体用法?C# IWindowManager怎么用?C# IWindowManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWindowManager类属于命名空间,在下文中一共展示了IWindowManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StockMinListadoViewModel
public StockMinListadoViewModel(IWindowManager windowmanager)
{
_windowManager = windowmanager;
Usuario u = new Usuario();
u = DataObjects.Seguridad.UsuarioSQL.buscarUsuarioPorIdUsuario(Int32.Parse(Thread.CurrentPrincipal.Identity.Name));
idTienda = u.IdTienda;
idResponsable = u.IdUsuario;
if (idTienda > 0) Enable = false;
else Enable = true;
Tienda central = new Tienda();
central.Nombre = "ALMACEN CENTRAL";
central.IdTienda = 0;
TiendaSQL tSQL = new TiendaSQL();
CmbTiendas = tSQL.BuscarTienda();
CmbTiendas.Insert(0, central);
Index = this.CmbTiendas.FindIndex(x => x.IdTienda == idTienda);
if (idTienda > 0)
{
ProductoSQL pSQL = new ProductoSQL();
LstProductos = pSQL.BuscarProductoxTienda(idTienda, true);
}
else
{
ProductoSQL pSQL = new ProductoSQL();
LstProductos = pSQL.BuscarProductoxCentral(1,-1, true);
}
}
示例2: MainViewModel
public MainViewModel(IEventAggregator eventAggregator, IWindowManager windowManager)
{
_eventAggregator = eventAggregator;
_windowManager = windowManager;
base.DisplayName = "Open Serial Port Monitor";// +Assembly.GetExecutingAssembly().GetName().Version;
}
示例3: DocumentViewModel
public DocumentViewModel(
IDialogService dialogService,
IWindowManager windowManager,
ISiteContextGenerator siteContextGenerator,
Func<string, IMetaWeblogService> getMetaWeblog,
ISettingsProvider settingsProvider,
IDocumentParser documentParser)
{
this.dialogService = dialogService;
this.windowManager = windowManager;
this.siteContextGenerator = siteContextGenerator;
this.getMetaWeblog = getMetaWeblog;
this.settingsProvider = settingsProvider;
this.documentParser = documentParser;
FontSize = GetFontSize();
title = "New Document";
Original = "";
Document = new TextDocument();
Post = new Post();
timer = new DispatcherTimer();
timer.Tick += TimerTick;
timer.Interval = delay;
}
示例4: MainController
public MainController(MainWindow window,
IWindowManager windowManager,
IStoredClassDataPresenter storedClassDataPresenter,
IConnectionPresenter connectionPresenter,
IStoredClassPresenter storedClassPresenter,
IFieldPresenter fieldPresenter,
IFieldListPresenter fieldListPresenter,
IConnectionStatisticsPresenter connectionStatisticsPresenter
)
{
this.window = window;
this.windowManager = windowManager;
this.storedClassDataPresenter = storedClassDataPresenter;
this.connectionPresenter = connectionPresenter;
this.storedClassPresenter = storedClassPresenter;
this.window.explorer.ShowDataFired += storedClassDataPresenter.ShowData;
this.window.explorer.ShowFieldsFired += fieldListPresenter.ShowFields;
this.window.AddNewConnectionFired += this.connectionPresenter.AddNew;
this.window.explorer.EditConnectionFired += this.connectionPresenter.Edit;
this.window.explorer.DeleteConnectionFired += this.connectionPresenter.Delete;
this.window.explorer.RenameClassFired += storedClassPresenter.RenameClass;
this.window.explorer.RenameFieldFired += fieldPresenter.RenameField;
this.window.explorer.ShowStatisticsFired += connectionStatisticsPresenter.Show;
this.window.explorer.CreateNewStoredClassFired += storedClassPresenter.CreateNew;
}
示例5: DevolucionesRegistrarViewModel
public DevolucionesRegistrarViewModel(IWindowManager windowmanager, DevolucionesBuscarViewModel window, int idDevolucion = -1)
{
_windowManager = windowmanager;
this.window = window;
if (idDevolucion > 0)
{
this.idDevolucion = idDevolucion;
this.ObtenerProductosVenta();
IndMantenimiento = DETALLE;
IsReadOnly = true;
if ((new DevolucionSQL()).puedeAnular(idDevolucion))
CanDelete = Visibility.Visible;
else
CanDelete = Visibility.Collapsed;
CanSave = Visibility.Collapsed;
ViewDni = Visibility.Collapsed;
}
else
{
IndMantenimiento = REGISTRO;
IsReadOnly = false;
CanDelete = Visibility.Collapsed;
CanSave = Visibility.Visible;
ViewDni = Visibility.Visible;
}
}
示例6: MantenerNotaDeIngresoViewModel
public MantenerNotaDeIngresoViewModel(IWindowManager windowmanager)
{
_windowManager = windowmanager;
pxaSQL = new ProductoSQL();
this.cmbMotivo = DataObjects.Almacen.MotivoSQL.BuscarMotivos(1);
AlmacenSQL aGW = new AlmacenSQL();
u = DataObjects.Seguridad.UsuarioSQL.buscarUsuarioPorIdUsuario(Int32.Parse(Thread.CurrentPrincipal.Identity.Name));
idTienda = u.IdTienda;
Models.Almacen.Almacenes a;
if (idTienda != 0)
{
//1 deposito
//2 anaquel
//3 central va al else
a = aGW.BuscarAlmacen(-1, idTienda, 1);
}
else
{
a = aGW.BuscarAlmacen(-1, -1, 3);
}
List<Usuario> ul = new List<Usuario>();
ul.Add(u);
this.responsable = new List<Usuario>(ul);
List<Models.Almacen.Almacenes> al = new List<Models.Almacen.Almacenes>();
al.Add(a);
this.almacen = al;
Estado = true;
EstadoMot = true;
EstadoPro = true;
}
示例7: Execute
public void Execute(IWindowManager windowManager, IQuestionDialog questionDialog)
{
var question = new Question(
null,
Text,
_possibleAnswers
);
questionDialog.Setup(
Caption,
new[] {question}
);
questionDialog.WasShutdown += delegate{
if(_handleResult != null)
_handleResult(question.Answer);
else if(question.Answer == Answer.No || question.Answer == Answer.Cancel)
{
Completed(this, new CancelResult());
return;
}
Completed(this, null);
};
windowManager.ShowDialog(questionDialog, null, null);
}
示例8: ShellViewModel
public ShellViewModel(
Func<HintSession, OverlayViewModel> overlayFactory,
Func<HintSession, DebugOverlayViewModel> debugOverlayFactory,
IHintProviderService hintProviderService,
IDebugHintProviderService debugHintProviderService,
IWindowManager windowManager,
Func<OptionsViewModel> optionsVmFactory,
IKeyListenerService keyListener)
{
_overlayFactory = overlayFactory;
_debugOverlayFactory = debugOverlayFactory;
_keyListener = keyListener;
_windowManager = windowManager;
_hintProviderService = hintProviderService;
_debugHintProviderService = debugHintProviderService;
_optionsVmFactory = optionsVmFactory;
_keyListener.HotKey = new HotKey
{
Keys = Keys.OemSemicolon,
Modifier = KeyModifier.Alt
};
#if DEBUG
_keyListener.DebugHotKey = new HotKey
{
Keys = Keys.OemSemicolon,
Modifier = KeyModifier.Alt | KeyModifier.Shift
};
#endif
_keyListener.OnHotKeyActivated += _keyListener_OnHotKeyActivated;
_keyListener.OnDebugHotKeyActivated += _keyListener_OnDebugHotKeyActivated;
}
示例9: NotifyIconViewModel
public NotifyIconViewModel(
IWindowManager windowManager,
ISyncThingManager syncThingManager,
Func<SettingsViewModel> settingsViewModelFactory,
IProcessStartProvider processStartProvider,
FileTransfersTrayViewModel fileTransfersViewModel)
{
this.windowManager = windowManager;
this.syncThingManager = syncThingManager;
this.settingsViewModelFactory = settingsViewModelFactory;
this.processStartProvider = processStartProvider;
this.FileTransfersViewModel = fileTransfersViewModel;
this.syncThingManager.StateChanged += (o, e) =>
{
this.SyncThingState = e.NewState;
if (e.NewState != SyncThingState.Running)
this.SyncThingSyncing = false; // Just make sure we reset this...
};
this.SyncThingState = this.syncThingManager.State;
this.syncThingManager.TotalConnectionStatsChanged += (o, e) =>
{
var stats = e.TotalConnectionStats;
this.SyncThingSyncing = stats.InBytesPerSecond > 0 || stats.OutBytesPerSecond > 0;
};
this.syncThingManager.DataLoaded += (o, e) =>
{
this.Folders = new BindableCollection<FolderViewModel>(this.syncThingManager.Folders.FetchAll()
.Select(x => new FolderViewModel(x, this.processStartProvider))
.OrderBy(x => x.FolderId));
};
}
示例10: MantenerGuiaDeRemisionViewModel
public MantenerGuiaDeRemisionViewModel(IWindowManager windowmanager, GuiaRemision g)
: this(windowmanager)
{
if (g.Nota != null)
{
Nota = g.Nota;
Alm = g.Almacen;
}
if (g.Orden != null)
{
Orden = g.Orden;
Orden.CodOrden = "OD-" + (1000000 + Orden.IdOrdenDespacho).ToString();
}
TxtCodigo = g.CodGuiaRem;
TxtFechaReg = g.FechaReg;
SeleccionadoTipo=g.Tipo;
TxtConductor = g.Conductor;
SeleccionadoCamion = g.Camion;
TxtObservaciones = g.Observaciones;
if (g.Estado == 1)
TxtEstado = "EMITIDA";
else
TxtEstado = "ATENDIDA";
indicador = 2;
}
示例11: BuscarZonaViewModel
public BuscarZonaViewModel(IWindowManager windowmanager)
{
_windowManager = windowmanager;
Usuario u = new Usuario();
u = DataObjects.Seguridad.UsuarioSQL.buscarUsuarioPorIdUsuario(Int32.Parse(Thread.CurrentPrincipal.Identity.Name));
idTienda = u.IdTienda;
idResponsable = u.IdUsuario;
TiendaSQL tSQL = new TiendaSQL();
CmbTiendas = tSQL.BuscarTienda();
Index = this.CmbTiendas.FindIndex(x => x.IdTienda == idTienda);
AlmacenSQL aSQL = new AlmacenSQL();
Almacenes anaquel = aSQL.BuscarAlmacen(-1, idTienda, 2);
idAnaquel = anaquel.IdAlmacen;
NumColumns = anaquel.NroColumnas;
NumRows = anaquel.NroFilas;
Altura = anaquel.Altura;
TipoZonaSQL tzSQL = new TipoZonaSQL();
LstZonasAnq = tzSQL.ObtenerZonasxAlmacen(idAnaquel, 2);
CmbZonas = lstZonasAnq;
ProductoSQL pSQL = new ProductoSQL();
LstProductos = pSQL.BuscarProductoxTienda(idTienda);
}
示例12: ShellViewModel
public ShellViewModel(IWindowManager window, IEventAggregator events)
{
_window = window;
_events = events;
DisplayName = "NXT Remote Control";
}
示例13: AppViewModel
public AppViewModel(IWindowManager windowManager)
{
_windowManager = windowManager;
// Init children view models.
SettingsViewModel = new SettingsViewModel(_windowManager);
}
示例14: ConsultaProdutoViewModel
public ConsultaProdutoViewModel(IWindowManager windowManager)
{
_windowManager = windowManager;
DisplayName = "Consulta de Produtos";
Consultar();
}
示例15: SimulationView
public SimulationView (Context context, SensorManager sensorManager, IWindowManager window)
: base (context)
{
Bounds = new PointF ();
// Get an accelorometer sensor
sensor_manager = sensorManager;
accel_sensor = sensor_manager.GetDefaultSensor (SensorType.Accelerometer);
// Calculate screen size and dpi
var metrics = new DisplayMetrics ();
window.DefaultDisplay.GetMetrics (metrics);
meters_to_pixels_x = metrics.Xdpi / 0.0254f;
meters_to_pixels_y = metrics.Ydpi / 0.0254f;
// Rescale the ball so it's about 0.5 cm on screen
var ball = BitmapFactory.DecodeResource (Resources, Resource.Drawable.Ball);
var dest_w = (int)(BALL_DIAMETER * meters_to_pixels_x + 0.5f);
var dest_h = (int)(BALL_DIAMETER * meters_to_pixels_y + 0.5f);
ball_bitmap = Bitmap.CreateScaledBitmap (ball, dest_w, dest_h, true);
// Load the wood background texture
var opts = new BitmapFactory.Options ();
opts.InDither = true;
opts.InPreferredConfig = Bitmap.Config.Rgb565;
wood_bitmap = BitmapFactory.DecodeResource (Resources, Resource.Drawable.Wood, opts);
wood_bitmap2 = BitmapFactory.DecodeResource (Resources, Resource.Drawable.Wood, opts);
display = window.DefaultDisplay;
particles = new ParticleSystem (this);
}