Search Results

Search found 32 results on 2 pages for 'netmajor'.

Page 1/2 | 1 2  | Next Page >

  • own .NET platform hosting

    - by netmajor
    Hey, What should I do to host on my own pc .NET web application(ASP.NET, Silverlight) with support Sql Server and services(RIA, WCF) ? What should I install and configure so others can see my webs in the internet ? It's some administration API which I can install on pc and by which I can upload my app like in professional hosting? That for help ;)

    Read the article

  • " not all code paths return a value" when return enum type

    - by netmajor
    I have enum list and method and i get error: " not all code paths return a value" Some idea whats wrong in my method ? I am sure I always return STANY type :/ Thanks for help :) private enum STANY { PATROL, CHAT, EAT, SEARCH, DIE }; private STANY giveState(int id, List<Ludek> gracze, List<int> plansza) { // Sprawdz czy gracz stoi na polu z jedzeniem i nie ma 2000 jednostek jedzenia bool onTheFood = false; onTheFood = CzyPoleZjedzeniem(id, gracze, plansza, onTheFood); if (onTheFood && (gracze[id].IloscJedzenia < startFood / 2)) return STANY.EAT; // Sprawdz czy gracz nie stoi na polu z innym graczem bool allKnowledge = true; allKnowledge = CzyPoleZInnymGraczem(id, gracze, allKnowledge); if (!allKnowledge) return STANY.CHAT; // Jesli ma ponad i rowna ilosc jedzenia patroluj if (gracze[id].IloscJedzenia >= startFood / 2) return STANY.PATROL; // Jesli ma mniej niz polowe jedzenia szukaj jedzenia if (gracze[id].IloscJedzenia > 0 && gracze[id].IloscJedzenia < startFood / 2) return STANY.SEARCH; // Jesli nie ma jedzenia umieraj if (gracze[id].IloscJedzenia <= 0) return STANY.DIE; }

    Read the article

  • insert radiobox in menu in forms

    - by netmajor
    Hey, How can I insert radiobutton in Menu as Menu item. I use WinForms and there I see only few option to insert other controls, but no radio :/ Also it's impossible to drag it from Controls and drop in menu in Design View :/

    Read the article

  • use Services in MVVM

    - by netmajor
    I want to use Services(WCF/RIA /Web) to take data from Entity Data Model class (maybe NHibernate class) and prepared it special for View layer binding. I have few Silverlight page, so should I create for each page separate service class ? Or create one interface and all method will implement it in one service class? Do You have some advice helped with my with services ?

    Read the article

  • implement INotifyCollectionChanged etc on xml file changed

    - by netmajor
    It's possible to implement INotifyCollectionChanged or other interface like IObservable to enable to bind filtered data from xml file on this file changed ? I see examples with properties or collection, but what with files changes ? I have that code to filter and bind xml data to list box: XmlDocument channelsDoc = new XmlDocument(); channelsDoc.Load("RssChannels.xml"); XmlNodeList channelsList = channelsDoc.GetElementsByTagName("channel"); this.RssChannelsListBox.DataContext = channelsList;

    Read the article

  • implementation Services in MVVM

    - by netmajor
    I want to use Services(WCF/RIA /Web) to take data from Entity Data Model class (maybe NHibernate class) and prepared it special for View layer binding. I have few Silverlight page, so should I create for each page separate service class ? Or create one interface and all method will implement it in one service class? Do You have some advice helped with my with services ?

    Read the article

  • reference from xaml to public class in .cs class file

    - by netmajor
    I have in my WPF project file RssInfo.cs in which I have public class public class DoubleRangeRule : ValidationRule { public double Min { get; set; } public double Max { get; set; } public override System.Windows.Controls.ValidationResult Validate(object value, CultureInfo cultureInfo) { ... } } and from my XAML code in WPF window class I neet to get to this DoubleRangeRule class.. //reference to my project, all my files are in the WpfCzytanieRSS namespace xmlns:valRule="clr-namespace:WpfCzytanieRSS;assembly=WpfCzytanieRSS" <TextBox Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}" Name="tbTitle"> <TextBox.Text> <Binding Path="Nazwa" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <valRule:DoubleRangeRule Min="0.5" Max="10"/> //error place </Binding.ValidationRules> </Binding> </TextBox.Text> </TextBox> And i get two errors: Error 1 The tag 'DoubleRangeRule' does not exist in XML namespace 'clr-namespace:WpfCzytanieRSS;assembly=WpfCzytanieRSS'. Error 2 The type 'valRule:DoubleRangeRule' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. Please help to get to class DoubleRangeRule ! :)

    Read the article

  • validation properties by attribute

    - by netmajor
    I create class with two property - name,link(below). I use simple property validation by Required and StringLength attribute. I bind this class object to WPF ListBox(with textBoxs). But when I have textbox empty or write words longer than 8 sign nothing happens :/ What should I do to fires ErrorMessage? Or how to implement validation in other way ? I also try use : if (value is int) { throw new ArgumentException("Wpisales stringa!!"); } But it only fires in debug mode :/ My class with implementation of attribute validation: public class RssInfo : INotifyPropertyChanged { public RssInfo() { } public RssInfo(string _nazwa, string _link) { nazwa = _nazwa; link = _link; } private string nazwa; [Required(ErrorMessage = "To pole jest obowiazkowe nAZWA")] public string Nazwa { get { return nazwa; } set { if (value != nazwa) { nazwa = value; onPropertyChanged("Nazwa"); } if (value is int) { throw new ArgumentException("Wpisales stringa!!"); } } } private string link; [Required(ErrorMessage="To pole jest obowiazkowe link")] [StringLength(8, ErrorMessage = "Link cannot be longer than 8 characters")] public string Link { get { return link; } set { if (value != link) { link = value; onPropertyChanged("Link"); } } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion private void onPropertyChanged(string propertyName) { if (this.PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }

    Read the article

  • List<element> initialization fires "Process is terminated due to StackOverflowException"

    - by netmajor
    I have structs like below and when I do that initialization: ArrayList nodesMatrix = null; List<vertex> vertexMatrix = null; List<bool> odwiedzone = null; List<element> priorityQueue = null; vertexMatrix = new List<vertex>(nodesNr + 1); nodesMatrix = new ArrayList(nodesNr + 1); odwiedzone = new List<bool>(nodesNr + 1); priorityQueue = new List<element>(); arr.NodesMatrix = nodesMatrix; arr.VertexMatrix = vertexMatrix; arr.Odwiedzone = odwiedzone; arr.PriorityQueue = priorityQueue; //only here i have exception debuger fires Process is terminated due to StackOverflowException :/ Some idea why this collection fires this exception ? private struct arrays { ArrayList nodesMatrix; public ArrayList NodesMatrix { get { return nodesMatrix; } set { nodesMatrix = value; } } List<vertex> vertexMatrix; public List<vertex> VertexMatrix { get { return vertexMatrix; } set { vertexMatrix = value; } } List<bool> odwiedzone; public List<bool> Odwiedzone { get { return odwiedzone; } set { odwiedzone = value; } } public List<element> PriorityQueue { get { return PriorityQueue; } set { PriorityQueue = value; } } } public struct element : IComparable { public double priority { get { return priority; } set { priority = value; } } public int node { get { return node; } set { node = value; } } public element(double _prio, int _node) { priority = _prio; node = _node; } #region IComparable Members public int CompareTo(object obj) { element elem = (element)obj; return priority.CompareTo(elem.priority); } #endregion

    Read the article

  • shortcut to menu

    - by netmajor
    Hey, How to create shortcut to menu in WinForms. I think about something like in Visual Studio and Firefox, where I press Alt and mainly menu items shortcut letters have been underline. How to do this??

    Read the article

  • create board for game with events support

    - by netmajor
    How can I create board for simple game, looks like for chess,but user could dynamically change number of column and rows? In cells I could insert symbol of pawn, like small image or just ellipse or rectangle with fill. This board should have possibility add and remove pawn from cells and move pown from one cell to another. My first idea was Grid. I do it in code behind, but it's hurt to implement events or everything in runtime create board :/ int size = 12; Grid board = new Grid(); board.ShowGridLines = true; for (int i = 0; i < size;i++ ) { board.ColumnDefinitions.Add(new ColumnDefinition()); board.RowDefinitions.Add(new RowDefinition()); } //komputer Rectangle ai = new Rectangle(); ai.Height = 20; ai.Width = 20; ai.AllowDrop = true; ai.Fill = Brushes.Orange; Grid.SetRow(ai, 0); Grid.SetColumn(ai,0); //czlowiek Rectangle hum = new Rectangle(); hum.Height = 20; hum.Width = 20; hum.AllowDrop = true; hum.Fill = Brushes.Green; Grid.SetRow(hum,size); Grid.SetColumn(hum,size); board.Children.Add(ai); board.Children.Add(hum); this.Content = board; It's a way to do this dynamically col and row change in XAML ? It's better way to implement that board create and implement events on move pawn from one cell to another ?

    Read the article

  • how to add enum value to list

    - by netmajor
    I have enum: public enum SymbolWejsciowy { K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 } and I want to create list of this enum public List<SymbolWejsciowy> symbol; but in my way to add enum to List: 1. SymbolWejsciowy symbol ; symbol.Add(symbol = SymbolWejsciowy.K1); 2. symbol.Add(SymbolWejsciowy.K1); I always get Exception Object reference not set to an instance of an object. What i do wrong :/ Please help :)

    Read the article

  • what it is Sharepoint ? Main advantages for programmer

    - by netmajor
    Hey, For some time i see that employers demand from programmers knowing Sharepoint, but I have problem with understand what it is :/ But today I was at IT training, and main guy told something like that:" Sharepoint is platform for commit code for programmer, control of version etc..." It is true? It looks like SVN tool... Can someone explain me what advantages it have for c# programmer? Thanks ;)

    Read the article

  • other way to add item do List<>

    - by netmajor
    In my other ask You can see code of my arr structure and PriorityQueue collection. I normally add items to this collection like that: arr.PriorityQueue.Add(new element((value(item, endPoint) + value(startPoint, item)),item)); I am curious that is other way to do this (add element(which is struct) object to List) ? In lambda way for example ? I just eager for knowledge :)

    Read the article

  • Work in Company vs paid add-ons for Visual Studio

    - by netmajor
    Hey, I'm yesterday install free(I'm student :D) DevExpress Refactor Tool for Visual Studio and think that is great stuff but... how looks using that add-ons in work place ? can You install it on Your own in Your pc?Employer agree with it ? it is difference that it's free or paid add-on ? did Your employer give You add-in from start ? (So You don't need to paid it Yourself?:D) Do You have Favorite add-in? ;) p.s. Do You know how to disable VS shortcut[Alt+Right] for feature? I want to use Refactor shortcut for CamelCaseRight but VS disable it for own shortcut :(

    Read the article

  • something like INotifyCollectionChanged fires on xml file changed

    - by netmajor
    It's possible to implement INotifyCollectionChanged or other interface like IObservable to enable to bind filtered data from xml file on this file changed ? I see examples with properties or collection, but what with files changes ? I have that code to filter and bind xml data to list box: XmlDocument channelsDoc = new XmlDocument(); channelsDoc.Load("RssChannels.xml"); XmlNodeList channelsList = channelsDoc.GetElementsByTagName("channel"); this.RssChannelsListBox.DataContext = channelsList;

    Read the article

  • other way to add item to List<>

    - by netmajor
    In my other question You can see code of my arr structure and PriorityQueue collection. I normally add items to this collection like that: arr.PriorityQueue.Add(new element((value(item, endPoint) + value(startPoint, item)),item)); I am curious that is other way to do this (add element(which is struct) object to List) ? In lambda way for example ? I just eager for knowledge :)

    Read the article

  • List<> own comparer

    - by netmajor
    I have a List where element is: struct element { double priority; int value; } How can I implement my own comparer which allow me sort List by priority ? I try with SortredList... but it don't allow douplicated keys :( Big thanks for help!

    Read the article

  • What is Sharepoint? What are its main advantages for programmer?

    - by netmajor
    Hey, For some time I’ve seen employers demanding Sharepoint knowledge from programmers, but I have a problem understanding what it is :/ But today I was at IT training, and the main guy said something like: “Sharepoint is platform for commit code for programmer, control of version etc...” Is that true? It sounds like SVN. Can someone explain me what advantages it has for a C# programmer? Thanks ;)

    Read the article

  • problem in basic implementation of MVVM pattern - Services

    - by netmajor
    I watch some video and read articles about MVVM pattern and start thinking how should I implement it in my Silverlight app. So at first I create Silverlight application. I think that for clear view I create 3 folders: View - for each user control page in my app, ViewModel - for c# class which will querying date and Model- Entity Data Model of my SQL Server or Oracle Database. And now I am confused, cause I want to implement *WCF/RIA Services/Web services* in my project. In which folder should I put in class of services? I see in examples that Services take date and filtering it and then output data was binding in View - so It looks as ViewModel. But I was sure that someone use Services in Model and that I want to do. But how? Can someone explain me implementing Services as Model? Is my point of view at MVVM is correctly?

    Read the article

  • how start implement MVVM pattern

    - by netmajor
    Hello, So i decide to to develop my asp.net site into Silverlight. I today start to search articles about MVVM pattern which i want use in my Silverlight app, and i am confused :/ It's hart to me understand how works this pattern. I am find 3 frameworks which supports MVVM pattern in Silverlight - Caliburn, MVVM Light Toolkit and GoodLight. Should i start from own implementation of pattern or use framework? Is this frameworks only a project solutions in which i can insert my code? Which framework is the best for novice and which for professional? I ask for this, cause i must start to rewrite my app from asp.net to Silverlight and i don't know that i can do it first and later (when i understand MVVM pattern and framework) implement this pattern in finished app ? Or from begining rewrite project to MVVM framework?

    Read the article

  • create own svn repository hosting

    - by netmajor
    Hey, Since week I use ToirtoiseSVN and AnkhSVN and GoogleCode and sourceforge.net as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about mu own repository hosting... Can I use simple file hosting etc. and install there software like use Google or SourceForge to have my own SVN Server ? My point is to have independent repository in internet without all this uselessly UI interface which give me Google and SF to administrate my version control. I don't want to take advantage of already exist hosting like GoogleCode etc - I want to be independent from them! ;) Or maybe it's other way to do my own repository hosting and FREE ;) Please don't tell me that I'm at mercy of commercial hosting... :/ p.s. If I wrote something wrong, sorry ;)

    Read the article

1 2  | Next Page >