Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            InputBindings.Add(new KeyBinding(new WindowCommand()
            {
                ExecuteDelegate = () => { Save_Click(null, null); }
            }, new KeyGesture(Key.S, ModifierKeys.Control)));

            outputTabs.render.onResolutionChanged = onResolutionChanged;

            fileTabs.onCurrentFileUpdated = onCurrentFileUpdated;
            fileTabs.onFileChanged        = onFileChanged;

            files = new SampleManager(fileTabs, onSampleSearchComplete);

            for (int i = 0; i < 4; i++)
            {
                ((ComboBoxItem)acceleratorPicker.Items.GetItemAt(i)).Content += FileRunner.getDesc((AcceleratorType)i);
            }

            Closed += MainWindow_Closed;

            if (!sampleTestMode)
            {
                fileTabs.AddCodeFile(new CodeFile("Program.cs", OutputType.bitmap, TextType.code, Templates.bitmapTemplate));
            }
        }
Esempio n. 2
0
        public SampleChannel GetChannel(SampleManager manager)
        {
            var channel = manager.Get($"Gameplay/{Bank}-{Name}");

            channel.Volume.Value = Volume / 100.0;
            return(channel);
        }
Esempio n. 3
0
 public LegacySkin(SkinInfo skin, IResourceStore <byte[]> storage, AudioManager audioManager)
     : base(skin)
 {
     storage  = new LegacySkinResourceStore(skin, storage);
     samples  = audioManager.GetSampleManager(storage);
     textures = new TextureStore(new RawTextureLoaderStore(storage));
 }
Esempio n. 4
0
 void Awake()
 {
     if (SampleManager.Instance == null)
     {
         SampleManager.Instance = this;
     }
 }
 public SamplesController(
     [FromServices] IAppSession session,
     SampleManager sampleManager
     ) : base()
 {
     _sampleManager = sampleManager;
 }
Esempio n. 6
0
    private void Start()
    {
        _sampleManager = GetComponent <SampleManager>();

        CreateCamera();
        CreateCanvas();
    }
Esempio n. 7
0
        public void TestExportSample()
        {
            EAMetaModel meta = new EAMetaModel().setupSchemaPackage();

            EAFactory rootClass = APIModels.APIModel.createAPI1(meta);

            meta.setupSchemaPackage();

            EA.Package package = SchemaManager.generateSample(EARepository.Repository);

            Assert.AreEqual(1, package.Diagrams.Count);
            object o = package.Diagrams.GetAt(0);

            EA.Diagram diagram = (EA.Diagram)o;

            Assert.AreEqual(3, package.Elements.Count);

            o = package.Elements.GetAt(0);
            EA.Element sample = (EA.Element)o;
            sample.RunState = ObjectManager.addRunState(sample.RunState, "intAttribute", "123", rootClass.clientElement.ElementID);

            meta.setupSamplePackage();
            //Test
            JObject jobject = (JObject)SampleManager.sampleToJObject(EARepository.Repository, diagram)["json"];

            Assert.AreEqual(8, jobject.Count);
        }
Esempio n. 8
0
 public void OnInit()
 {
     SampleMgr = new SampleManager();
     SampleMgr.OnInit();
     ResourceMgr = new ResourceManager();
     ResourceMgr.OnInit();
 }
Esempio n. 9
0
 public void TestConvertEATypeToValue_Negative()
 {
     {
         //Not a great test
         object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_NUMBER, "true");
         Assert.IsFalse(o is float);
     }
 }
Esempio n. 10
0
 public SampleController(
     IAuthenticationManager authenticationManager,
     SampleManager manager
     )
 {
     this.authenticationManager = authenticationManager;
     this.manager = manager;
 }
 private void Start()
 {
     _sampleManage = GetComponent <SampleManager>();
     _sampleManage.OnSampleDataReady += () =>
     {
         _providerStatus = ProviderStatus.Ready;
     };
 }
        public MainViewModel()
        {
            SampleManager manager = new SampleManager(); //Model stuff !

            foreach (var item in manager.CurrentStock.OnStock)
            {
                Items.Add(new StockEntryViewModel(item)); //viewmodel stuff!
            }
        }
    private void Start()
    {
        _sampleManager = GetComponent <SampleManager>();
        _xrCamera      = GameObject.FindWithTag(SturfeeObjects.XRCamera).GetComponent <Camera>();

        _sampleManager.OnSampleDataReady += PopulateFrames;

        _providerStatus = ProviderStatus.Initializing;
    }
        public StockItemWindow()
        {
            SampleManager manager = new SampleManager();

            Groups = manager.AvailableGroups;

            InitializeComponent();
            this.DataContext = this;
        }
Esempio n. 15
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         authenticationManager = null;
         manager = null;
     }
     base.Dispose(disposing);
 }
Esempio n. 16
0
        public MainViewModel()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;
            foreach (var item in manager.CurrentStock.OnStock)
            {
                Items.Add(new StockEntryViewModel(item));  //filling view model data stucture
            }
        }
Esempio n. 17
0
        public void loaditems()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;

            foreach (var item in stock)
            {
                Items1.Add(new StockEntryViewModel(item));
            }
        }
Esempio n. 18
0
        private void LoadAllData()
        {
            SampleManager manager = new SampleManager();

            stocklist = manager.CurrentStock.OnStock;
            foreach (var i in stocklist)
            {
                itemList.Add(new Item(i));
                itemListWithoutDeleted.Add(new Item(i));
            }
        }
Esempio n. 19
0
 private void InitObjects()
 {
     Users = new UserManager(context);
     Rulos = new RuloManager(context);
     DefinationProcesses = new DefinationProcessManager(context);
     Machines            = new MachineManager(context);
     TestResults         = new TestResultManager(context);
     Floors           = new FloorManager(context);
     OriginCategories = new OriginCategoryManager(context);
     TestCategories   = new TestCategoryManager(context);
     Samples          = new SampleManager(context);
 }
Esempio n. 20
0
        public MainViewModel()
        {
            SampleManager manager = new SampleManager();

            foreach (var item in manager.CurrentStock.OnStock)
            {
                Items.Add(new StockEntryViewModel(item));
            }

            OnButtonClickedCommand = new RelayCommand(
                new Action(DoItOnButtonClick),
                new Func <bool>(CanExecuteButton));
        }
Esempio n. 21
0
        public void TestValidateDiagram_Invalid()
        {
            EAMetaModel meta = new EAMetaModel().setupSchemaPackage();

            EAFactory rootClass = APIModels.APIModel.createInvalidAPI(meta);

            meta.setupSamplePackage();

            //Test
            IList <string> errors = SampleManager.diagramValidation(EARepository.Repository, meta.sampleDiagram);

            Assert.IsTrue(errors.Count > 0);
        }
Esempio n. 22
0
        public ObservableCollection <StockEntryViewModel> load_items()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;
            Dataoperations.Dataoperation dop = new Dataoperation();
            foreach (var item in stock)
            {
                Items1.Add(new StockEntryViewModel(item));
            }

            return(Items1);
        }
Esempio n. 23
0
        public MainViewModel()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;

            foreach (var item in stock)
            {
                items.Add(new StockEntryModel(item));
            }

            DeleteItem = new RelayCommand(DeleteRow);
            AddItem    = new RelayCommand(AddRow);
        }
Esempio n. 24
0
        public static void Initialize(ContentManager content)
        {
            Content = content;

            Fonts = new Dictionary <String, SpriteFont>();

            Fonts.Add("DefaultFont", Content.Load <SpriteFont>("Fonts/rawline-600"));
            Fonts["DefaultFont"].DefaultCharacter = '?'; // Prevents crashing with invalid characters

            Skin.LoadSkin("DefaultSkin");
            SampleManager.Init();

            StoredTexture = new Dictionary <String, KeyValuePair <Texture2D, double> >();
        }
Esempio n. 25
0
        public SampleManager GetSampleManager(ResourceStore <byte[]> store = null)
        {
            if (store == null)
            {
                return(globalSampleManager);
            }

            SampleManager sm = new SampleManager(store);

            AddItem(sm);
            sm.AddAdjustment(AdjustableProperty.Volume, VolumeSample);

            return(sm);
        }
Esempio n. 26
0
        public void LoadData()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;
            filteredList.Add(showAll);

            foreach (var item in manager.CurrentStock.OnStock)
            {
                saleitems.Add(new StockEntryViewModel(item));
                filteredSaleitems.Add(new StockEntryViewModel(item));
                filteredList.Add(new StockEntryViewModel(item).Name);
            }
        }
Esempio n. 27
0
        public MainViewModel()
        {
            SampleManager manager = new SampleManager();

            stock = manager.CurrentStock.OnStock;

            foreach (var item in manager.CurrentStock.OnStock)
            {
                Items.Add(new StockEntryViewModel(item));
            }

            AddCommand = new RelayCommand(AddNewRow, CanExecute);

            DeleteCommand = new RelayCommand(DeleteSelected, CanExecute);
        }
Esempio n. 28
0
        /// <summary>
        /// Obtains the <see cref="SampleManager"/> corresponding to a given resource store.
        /// Returns the global <see cref="SampleManager"/> if no resource store is passed.
        /// </summary>
        /// <param name="store">The <see cref="T:ResourceStore"/> of which to retrieve the <see cref="SampleManager"/>.</param>
        public SampleManager GetSampleManager(IResourceStore <byte[]> store = null)
        {
            if (store == null)
            {
                return(globalSampleManager.Value);
            }

            SampleManager sm = new SampleManager(store);

            AddItem(sm);
            sm.AddAdjustment(AdjustableProperty.Volume, VolumeSample);
            VolumeSample.ValueChanged += sm.InvalidateState;

            return(sm);
        }
Esempio n. 29
0
 public void TestConvertEATypeToValue_Positive()
 {
     {
         object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_NUMBER, "5.23");
         Assert.IsTrue(o is float);
     }
     {
         object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_BOOLEAN, "true");
         Assert.IsTrue(o is bool);
     }
     {
         object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_STRING, "John");
         Assert.IsTrue(o is string);
     }
 }
Esempio n. 30
0
        protected LegacySkin(SkinInfo skin, IResourceStore <byte[]> storage, AudioManager audioManager, string filename) : base(skin)
        {
            Stream stream = storage.GetStream(filename);

            if (stream != null)
            {
                using (StreamReader reader = new StreamReader(stream))
                    Configuration = new LegacySkinDecoder().Decode(reader);
            }
            else
            {
                Configuration = new SkinConfiguration();
            }

            Samples  = audioManager.GetSampleManager(storage);
            Textures = new TextureStore(new TextureLoaderStore(storage));
        }
Esempio n. 31
0
 public void Awake()
 {
     instance = this;
 }